Utimes
[<Interface>]
type Utimes =
abstract member Invoke (path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback) : unit
abstract member __promisify__ (path: PathLike, atime: TimeLike, mtime: TimeLike) : Promise<unit>| Assembly | Xantham.Fable.Node |
Methods
abstract member Invoke (path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback) : unit
abstract member Invoke (path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback) : unitChange 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 in seconds,
Dates, or a numeric string like'123456789.0'. - If the value can not be converted to a number, or is
NaN,Infinity, or-Infinity, anErrorwill be thrown.
@since v0.4.2
abstract member __promisify__ (path: PathLike, atime: TimeLike, mtime: TimeLike) : Promise<unit>
abstract member __promisify__ (path: PathLike, atime: TimeLike, mtime: TimeLike) : Promise<unit>Asynchronously change file timestamps of the file referenced by the supplied path.
| Parameter | |
|---|---|
path | A path to a file. If a URL is provided, it must use the file: protocol. |
atime | The last access time. If a string is provided, it will be coerced to number. |
mtime | The last modified time. If a string is provided, it will be coerced to number. |