fd 标识符
atime
mtime
callback 回调
例子:
复制代码 代码如下:
fs.open("/path/demo1.txt", "a", function (err, fd) {
if (err) {
throw err;
}
fs.futimes(fd, 1388648322, 1388648322, function (err) {
if (err) {
throw err;
}
console.log("futimes complete");
fs.close(fd, function () {
console.log("Done");
});
});
});
源码:
复制代码 代码如下:
fs.futimes = function(fd, atime, mtime, callback) {
atime = toUnixTimestamp(atime);
mtime = toUnixTimestamp(mtime);
binding.futimes(fd, atime, mtime, makeCallback(callback));
};