* Synchronously changes the file system timestamps * of the object referenced by `path`. * @param {string | Buffer | URL} path * @param {number | string | Date} atime * @param {number | string | Date} mtime * @returns {void}
(path, atime, mtime)
| 2639 | * @returns {void} |
| 2640 | */ |
| 2641 | function utimesSync(path, atime, mtime) { |
| 2642 | path = getValidatedPath(path); |
| 2643 | |
| 2644 | const h = vfsState.handlers; |
| 2645 | if (h !== null) { |
| 2646 | const result = h.utimesSync(path, atime, mtime); |
| 2647 | if (result !== undefined) return; |
| 2648 | } |
| 2649 | |
| 2650 | binding.utimes( |
| 2651 | path, |
| 2652 | toUnixTimestamp(atime), |
| 2653 | toUnixTimestamp(mtime), |
| 2654 | ); |
| 2655 | } |
| 2656 | |
| 2657 | /** |
| 2658 | * Changes the file system timestamps of the object |
no test coverage detected
searching dependent graphs…