MCPcopy Create free account
hub / github.com/Snapchat/Valdi / readFileSync

Function readFileSync

src/valdi_modules/src/valdi/file_system/web/FileSystem.ts:98–107  ·  view source on GitHub ↗
(path: string, options?: ReadFileOptions)

Source from the content-addressed store, hash-verified

96 cur = parentDir(cur);
97 }
98 if (!dirs.has(cur) && !createIntermediates) return false;
99 if (!createIntermediates && parentDir(p) !== cur) return false;
100
101 // create parents if requested/needed
102 while (chain.length) {
103 const d = chain.pop()!;
104 dirs.add(d);
105 }
106 return true;
107 },
108
109 readFileSync(path: string, options?: ReadFileOptions): string | ArrayBuffer {
110 const p = norm(path);

Callers 4

readMethod · 0.85
isValidMethod · 0.85
readMethod · 0.85
isValidMethod · 0.85

Calls 4

normFunction · 0.85
decodeUtf16LEFunction · 0.85
getMethod · 0.65
decodeMethod · 0.65

Tested by

no test coverage detected