Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/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

ParameterTypeDescription
pathstringThe path of the file that should be modified.
timesIFileSystemUpdateTimeParametersThe times that the object should be updated to reflect.

Returns:

void