Skip to content

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>
AssemblyXantham.Fable.Node

Methods

abstract member Invoke (path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback) : unit

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 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, an Error will be thrown.

@since v0.4.2

abstract member __promisify__ (path: PathLike, atime: TimeLike, mtime: TimeLike) : Promise<unit>

Asynchronously change file timestamps of the file referenced by the supplied path.

Parameter
pathA path to a file. If a URL is provided, it must use the file: protocol.
atimeThe last access time. If a string is provided, it will be coerced to number.
mtimeThe last modified time. If a string is provided, it will be coerced to number.