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

Function lutimesSync

lib/fs.js:2745–2759  ·  view source on GitHub ↗

* Synchronously changes the access and modification * times of a file in the same way as `fs.utimesSync()`. * @param {string | Buffer | URL} path * @param {number | string | Date} atime * @param {number | string | Date} mtime * @returns {void}

(path, atime, mtime)

Source from the content-addressed store, hash-verified

2743 * @returns {void}
2744 */
2745function lutimesSync(path, atime, mtime) {
2746 path = getValidatedPath(path);
2747
2748 const h = vfsState.handlers;
2749 if (h !== null) {
2750 const result = h.lutimesSync(path, atime, mtime);
2751 if (result !== undefined) return;
2752 }
2753
2754 binding.lutimes(
2755 path,
2756 toUnixTimestamp(atime),
2757 toUnixTimestamp(mtime),
2758 );
2759}
2760
2761function writeAll(fd, isUserFd, buffer, offset, length, signal, flush, callback) {
2762 if (signal?.aborted) {

Callers

nothing calls this directly

Calls 3

toUnixTimestampFunction · 0.85
lutimesMethod · 0.80
lutimesSyncMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…