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

Function futimesSync

lib/fs.js:2693–2709  ·  view source on GitHub ↗

* Synchronously changes the file system timestamps * of the object referenced by the * supplied `fd` (file descriptor). * @param {number} fd * @param {number | string | Date} atime * @param {number | string | Date} mtime * @returns {void}

(fd, atime, mtime)

Source from the content-addressed store, hash-verified

2691 * @returns {void}
2692 */
2693function futimesSync(fd, atime, mtime) {
2694 const h = vfsState.handlers;
2695 if (h !== null) {
2696 const result = h.futimesSync(fd);
2697 if (result !== undefined) return;
2698 }
2699
2700 if (permission.isEnabled()) {
2701 throw new ERR_ACCESS_DENIED('futimes API is disabled when Permission Model is enabled.');
2702 }
2703
2704 binding.futimes(
2705 fd,
2706 toUnixTimestamp(atime, 'atime'),
2707 toUnixTimestamp(mtime, 'mtime'),
2708 );
2709}
2710
2711/**
2712 * Changes the access and modification times of

Callers

nothing calls this directly

Calls 2

toUnixTimestampFunction · 0.85
isEnabledMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…