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

Function chmod

lib/internal/fs/promises.js:1876–1891  ·  view source on GitHub ↗
(path, mode)

Source from the content-addressed store, hash-verified

1874}
1875
1876async function chmod(path, mode) {
1877 path = getValidatedPath(path);
1878 mode = parseFileMode(mode, 'mode');
1879
1880 const h = vfsState.handlers;
1881 if (h !== null) {
1882 const promise = h.chmod(path, mode);
1883 if (promise !== undefined) { await promise; return; }
1884 }
1885
1886 return await PromisePrototypeThen(
1887 binding.chmod(path, mode, kUsePromises),
1888 undefined,
1889 handleErrorFromBinding,
1890 );
1891}
1892
1893async function lchmod(path, mode) {
1894 const h = vfsState.handlers;

Callers 2

fixWinEPERMFunction · 0.70
setDestModeFunction · 0.50

Calls 2

parseFileModeFunction · 0.85
chmodMethod · 0.45

Tested by

no test coverage detected