* Synchronously sets the permissions on the file. * @param {number} fd * @param {string | number} mode * @returns {void}
(fd, mode)
| 2365 | * @returns {void} |
| 2366 | */ |
| 2367 | function fchmodSync(fd, mode) { |
| 2368 | const h = vfsState.handlers; |
| 2369 | if (h !== null) { |
| 2370 | const result = h.fchmodSync(fd); |
| 2371 | if (result !== undefined) return; |
| 2372 | } |
| 2373 | |
| 2374 | if (permission.isEnabled()) { |
| 2375 | throw new ERR_ACCESS_DENIED('fchmod API is disabled when Permission Model is enabled.'); |
| 2376 | } |
| 2377 | binding.fchmod( |
| 2378 | fd, |
| 2379 | parseFileMode(mode, 'mode'), |
| 2380 | ); |
| 2381 | } |
| 2382 | |
| 2383 | /** |
| 2384 | * Changes the permissions on a symbolic link. |
nothing calls this directly
no test coverage detected
searching dependent graphs…