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

Function glob

packages/computer/src/workspace.ts:1167–1180  ·  view source on GitHub ↗
(pattern)

Source from the content-addressed store, hash-verified

1165 await fs.rm(path, opts);
1166 },
1167 async glob(pattern) {
1168 const { directory, relativePattern } = splitGlobPattern(pattern);
1169 const matches = await fs.find(directory, relativePattern);
1170 return matches.map((match) =>
1171 toThinkFileInfo({
1172 path: match.path,
1173 name: basename(match.path),
1174 size: 0,
1175 mtime: 0,
1176 isDirectory: match.type === "dir",
1177 isFile: match.type === "file",
1178 }),
1179 );
1180 },
1181 async mkdir(path, opts) {
1182 await fs.mkdir(path, opts);
1183 },

Callers

nothing calls this directly

Calls 4

splitGlobPatternFunction · 0.85
toThinkFileInfoFunction · 0.85
basenameFunction · 0.70
findMethod · 0.65

Tested by

no test coverage detected