MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / doWrite

Method doWrite

packages/sdk/src/adapters/fs.ts:48–57  ·  view source on GitHub ↗
(path: string, content: string)

Source from the content-addressed store, hash-verified

46 }
47
48 private async doWrite(path: string, content: string): Promise<void> {
49 try {
50 const abs = this.abs(path);
51 await mkdir(dirname(abs), { recursive: true });
52 await writeFile(abs, content, "utf8");
53 await this.appendVersion(path, content);
54 } catch (err) {
55 for (const h of this.errorHandlers) h({ error: { message: String(err), cause: err } });
56 }
57 }
58
59 async flush(): Promise<void> {
60 // Promise.all rejects on the first write failure; per-write errors are also

Callers 1

writeMethod · 0.95

Calls 3

absMethod · 0.95
appendVersionMethod · 0.95
writeFileFunction · 0.85

Tested by

no test coverage detected