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

Function fchmod

lib/internal/fs/promises.js:1864–1874  ·  view source on GitHub ↗
(handle, mode)

Source from the content-addressed store, hash-verified

1862}
1863
1864async function fchmod(handle, mode) {
1865 if (permission.isEnabled()) {
1866 throw new ERR_ACCESS_DENIED('fchmod API is disabled when Permission Model is enabled.');
1867 }
1868 mode = parseFileMode(mode, 'mode');
1869 return await PromisePrototypeThen(
1870 binding.fchmod(handle.fd, mode, kUsePromises),
1871 undefined,
1872 handleErrorFromBinding,
1873 );
1874}
1875
1876async function chmod(path, mode) {
1877 path = getValidatedPath(path);

Callers 1

lchmodFunction · 0.70

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…