* Synchronously changes the permissions of a file. * @param {string | Buffer | URL} path * @param {string | number} mode * @returns {void}
(path, mode)
| 2454 | * @returns {void} |
| 2455 | */ |
| 2456 | function chmodSync(path, mode) { |
| 2457 | path = getValidatedPath(path); |
| 2458 | mode = parseFileMode(mode, 'mode'); |
| 2459 | |
| 2460 | const h = vfsState.handlers; |
| 2461 | if (h !== null) { |
| 2462 | const result = h.chmodSync(path, mode); |
| 2463 | if (result !== undefined) return; |
| 2464 | } |
| 2465 | |
| 2466 | binding.chmod(path, mode); |
| 2467 | } |
| 2468 | |
| 2469 | /** |
| 2470 | * Sets the owner of the symbolic link. |
no test coverage detected
searching dependent graphs…