* 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)
| 2718 | * @returns {void} |
| 2719 | */ |
| 2720 | function 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 |
no test coverage detected
searching dependent graphs…