MCPcopy Index your code
hub / github.com/nodejs/node / utimes

Function utimes

lib/internal/fs/promises.js:1954–1973  ·  view source on GitHub ↗
(path, atime, mtime)

Source from the content-addressed store, hash-verified

1952}
1953
1954async function utimes(path, atime, mtime) {
1955 path = getValidatedPath(path);
1956
1957 const h = vfsState.handlers;
1958 if (h !== null) {
1959 const promise = h.utimes(path, atime, mtime);
1960 if (promise !== undefined) { await promise; return; }
1961 }
1962
1963 return await PromisePrototypeThen(
1964 binding.utimes(
1965 path,
1966 toUnixTimestamp(atime),
1967 toUnixTimestamp(mtime),
1968 kUsePromises,
1969 ),
1970 undefined,
1971 handleErrorFromBinding,
1972 );
1973}
1974
1975async function futimes(handle, atime, mtime) {
1976 if (permission.isEnabled()) {

Callers 1

setDestTimestampsFunction · 0.50

Calls 2

toUnixTimestampFunction · 0.85
utimesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…