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

Function createFileWithPerms

test/parallel/test-fs-access.js:25–28  ·  view source on GitHub ↗
(file, mode)

Source from the content-addressed store, hash-verified

23const readWriteFile = tmpdir.resolve('read_write_file');
24
25function createFileWithPerms(file, mode) {
26 fs.writeFileSync(file, '');
27 fs.chmodSync(file, mode);
28}
29
30tmpdir.refresh();
31createFileWithPerms(readOnlyFile, 0o444);

Callers 1

test-fs-access.jsFile · 0.85

Calls 2

writeFileSyncMethod · 0.45
chmodSyncMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…