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

Method downloadToPath

npm_modules/cli/src/setup/DevSetupHelper.ts:26–35  ·  view source on GitHub ↗
(url: string, dest: string)

Source from the content-addressed store, hash-verified

24 }
25
26 async downloadToPath(url: string, dest: string): Promise<void> {
27 const body = await this.download(url);
28
29 const dir = path.dirname(dest);
30 if (!fs.existsSync(dir)) {
31 fs.mkdirSync(dir, { recursive: true });
32 }
33
34 await fs.promises.writeFile(dest, new Uint8Array(body));
35 }
36
37 async runShell(
38 guide: string,

Callers 1

linuxSetupFunction · 0.95

Calls 2

downloadMethod · 0.95
writeFileMethod · 0.65

Tested by

no test coverage detected