* 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 * @param {(err?: Error) => any} callback * @returns {void}
(fd, atime, mtime, callback)
| 2664 | * @returns {void} |
| 2665 | */ |
| 2666 | function futimes(fd, atime, mtime, callback) { |
| 2667 | atime = toUnixTimestamp(atime, 'atime'); |
| 2668 | mtime = toUnixTimestamp(mtime, 'mtime'); |
| 2669 | callback = makeCallback(callback); |
| 2670 | |
| 2671 | const h = vfsState.handlers; |
| 2672 | if (h !== null && vfsVoid(h.futimes(fd), callback)) return; |
| 2673 | |
| 2674 | if (permission.isEnabled()) { |
| 2675 | callback(new ERR_ACCESS_DENIED('futimes API is disabled when Permission Model is enabled.')); |
| 2676 | return; |
| 2677 | } |
| 2678 | |
| 2679 | const req = new FSReqCallback(); |
| 2680 | req.oncomplete = callback; |
| 2681 | binding.futimes(fd, atime, mtime, req); |
| 2682 | } |
| 2683 | |
| 2684 | /** |
| 2685 | * Synchronously changes the file system timestamps |
nothing calls this directly
no test coverage detected
searching dependent graphs…