Home > @microsoft/node-core-library > FileSystem > updateTimes

FileSystem.updateTimes() method

Updates the accessed and modified timestamps of the filesystem object referenced by path. Behind the scenes it uses fs.utimesSync(). The caller should specify both times in the times parameter.

Signature:

static updateTimes(path: string, times: IFileSystemUpdateTimeParameters): void;

Parameters

Parameter Type Description
path string The path of the file that should be modified.
times IFileSystemUpdateTimeParameters The times that the object should be updated to reflect.

Returns:

void