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

Function chmodSync

lib/fs.js:2456–2467  ·  view source on GitHub ↗

* Synchronously changes the permissions of a file. * @param {string | Buffer | URL} path * @param {string | number} mode * @returns {void}

(path, mode)

Source from the content-addressed store, hash-verified

2454 * @returns {void}
2455 */
2456function 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.

Callers 5

setDestModeFunction · 0.85
test-fs-glob.mjsFile · 0.85
windows-shims.jsFile · 0.85

Calls 3

parseFileModeFunction · 0.85
chmodSyncMethod · 0.45
chmodMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…