MCPcopy Create free account
hub / github.com/cloudflare/computer / chmod

Function chmod

packages/computerd/src/fuse/driver.ts:841–858  ·  view source on GitHub ↗
(path, mode, cb)

Source from the content-addressed store, hash-verified

839 },
840
841 chmod(path, mode, cb) {
842 if (!exists(path)) {
843 cb(ERRNO.ENOENT);
844 return;
845 }
846 const entry = files.get(path);
847 if (entry !== undefined) entry.mode = mode;
848 updateMeta(path, { mode });
849 if (entry === undefined && directWriteVfs.chmodSync !== undefined) {
850 try {
851 directWriteVfs.chmodSync(toVfs(path), mode);
852 } catch (error) {
853 cb(toErrno(error));
854 return;
855 }
856 }
857 cb(0);
858 },
859
860 chown(path, uid, gid, cb) {
861 if (!exists(path)) {

Callers 2

buildTargetFunction · 0.50
build.mjsFile · 0.50

Calls 6

updateMetaFunction · 0.85
toVfsFunction · 0.85
toErrnoFunction · 0.85
chmodSyncMethod · 0.80
existsFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected