fs.utimes(path, atime, mtime, callback)
-
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'
这样的数字字符串。¥Values can be either numbers representing Unix epoch time in seconds,
Date
s, or a numeric string like'123456789.0'
. -
如果该值不能转换为数字,或者是
NaN
、Infinity
或-Infinity
,则会抛出Error
。¥If the value can not be converted to a number, or is
NaN
,Infinity
, or-Infinity
, anError
will be thrown.