MCPcopy Index your code
hub / github.com/nodejs/node / fchmodSync

Function fchmodSync

lib/fs.js:2367–2381  ·  view source on GitHub ↗

* Synchronously sets the permissions on the file. * @param {number} fd * @param {string | number} mode * @returns {void}

(fd, mode)

Source from the content-addressed store, hash-verified

2365 * @returns {void}
2366 */
2367function 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.

Callers

nothing calls this directly

Calls 2

parseFileModeFunction · 0.85
isEnabledMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…