fs.utimes(path, atime, mtime, callback)
path<string> | <Buffer> | <URL>atime<number> | <string> | <Date>mtime<number> | <string> | <Date>callback<Function>err<Error>
更改由 path 引用的对象的文件系统时间戳。
【Change the file system timestamps of the object referenced by path.】
atime 和 mtime 参数遵循以下规则:
【The atime and mtime arguments follow these rules:】
- 值可以是表示 Unix 纪元时间(以秒为单位)的数字、
Date对象,或者像'123456789.0'这样的数字字符串。 - 如果该值无法转换为数字,或者是
NaN、Infinity或-Infinity,将会抛出一个Error。