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

Function lutimes

lib/fs.js:2720–2735  ·  view source on GitHub ↗

* Changes the access and modification times of * a file in the same way as `fs.utimes()`. * @param {string | Buffer | URL} path * @param {number | string | Date} atime * @param {number | string | Date} mtime * @param {(err?: Error) => any} callback * @returns {void}

(path, atime, mtime, callback)

Source from the content-addressed store, hash-verified

2718 * @returns {void}
2719 */
2720function lutimes(path, atime, mtime, callback) {
2721 callback = makeCallback(callback);
2722 path = getValidatedPath(path);
2723
2724 const h = vfsState.handlers;
2725 if (h !== null && vfsVoid(h.lutimes(path, atime, mtime), callback)) return;
2726
2727 const req = new FSReqCallback();
2728 req.oncomplete = callback;
2729 binding.lutimes(
2730 path,
2731 toUnixTimestamp(atime),
2732 toUnixTimestamp(mtime),
2733 req,
2734 );
2735}
2736
2737/**
2738 * Synchronously changes the access and modification

Callers 1

doTestFunction · 0.50

Calls 4

vfsVoidFunction · 0.85
toUnixTimestampFunction · 0.85
lutimesMethod · 0.80
makeCallbackFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…