Method Description:
Changes the timestamp of a file that is referenced by a file descriptor provided by a file.
Short Change Time stamp
Grammar:
Copy Code code as follows:
Fs.futimes (FD, Atime, Mtime, callback)
Because this method belongs to the FS module, it is necessary to introduce FS module (VAR fs= require ("FS") before use.
Receive parameters:
FD identifier
Atime
Mtime
Callback Callback
Example:
Copy Code code as follows:
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 ');
});
});
});
Source:
Copy Code code as follows:
Fs.futimes = function (FD, Atime, Mtime, callback) {
Atime = Tounixtimestamp (atime);
Mtime = Tounixtimestamp (mtime);
Binding.futimes (FD, Atime, Mtime, Makecallback (callback));
};