function promises.utimes
Usage in Deno
import { promises } from "node:fs"; const { utimes } = promises;
utimes(): Promise<void>
Change the file system timestamps of the object referenced by path
.
The atime
and mtime
arguments follow these rules:
- Values can be either numbers representing Unix epoch time,
Date
s, or a numeric string like'123456789.0'
. - If the value can not be converted to a number, or is
NaN
,Infinity
, or-Infinity
, anError
will be thrown.
Promise<void>
Fulfills with undefined
upon success.