SoFunction
Updated on 2025-03-10

Instructions for using the method

Method description:

Changes the timestamp of the file referenced by a file provided by the file descriptor.

Abbreviation Change Timestamp

grammar:

Copy the codeThe code is as follows:

(fd, atime, mtime, callback)

Since this method belongs to the FS module, it is necessary to introduce the FS module before use (var fs= require("fs") )

Receive parameters:

fd                                                              �

atime

mtime

callback   callback

example:

Copy the codeThe code is as follows:

('/path/', 'a', function (err, fd) {
  if (err) {
    throw err;
  }
  (fd, 1388648322, 1388648322, function (err) {
    if (err) {
      throw err;
    }
    ('futimes complete');
    (fd, function () {
      ('Done');
    });
  });
});

Source code:

Copy the codeThe code is as follows:

= function(fd, atime, mtime, callback) {
  atime = toUnixTimestamp(atime);
  mtime = toUnixTimestamp(mtime);
  (fd, atime, mtime, makeCallback(callback));
};