MCPcopy Create free account
hub / github.com/denoland/std / chmod

Function chmod

fs/unstable_chmod.ts:44–54  ·  view source on GitHub ↗
(path: string | URL, mode: number)

Source from the content-addressed store, hash-verified

42 * @param mode A sequence of 3 octal numbers representing file permissions.
43 */
44export async function chmod(path: string | URL, mode: number) {
45 if (isDeno) {
46 await Deno.chmod(path, mode);
47 } else {
48 try {
49 await getNodeFs().promises.chmod(path, mode);
50 } catch (error) {
51 throw mapError(error);
52 }
53 }
54}
55
56/**
57 * Synchronously changes the permission of a specific file/directory of

Callers 1

Calls 2

getNodeFsFunction · 0.90
mapErrorFunction · 0.90

Tested by

no test coverage detected