MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / writeFile

Method writeFile

services/app-builder/src/git/memfs.ts:21–26  ·  view source on GitHub ↗
(path: string, data: string | Uint8Array)

Source from the content-addressed store, hash-verified

19 }
20
21 async writeFile(path: string, data: string | Uint8Array): Promise<void> {
22 const bytes = typeof data === 'string' ? new TextEncoder().encode(data) : data;
23
24 const normalized = path.startsWith('/') ? path.slice(1) : path;
25 this.files.set(normalized, bytes);
26 }
27
28 async readFile(path: string, options?: { encoding?: string }): Promise<Uint8Array | string> {
29 const normalized = path.startsWith('/') ? path.slice(1) : path;

Callers 15

pushToRemoteMethod · 0.95
buildRepositoryMethod · 0.95
setupArchiveSourceMethod · 0.45
hydrateDbFromSnapshotFunction · 0.45
runSetupCommandsFunction · 0.45
writeAuthFileFunction · 0.45
writeRestoreTokenFileFunction · 0.45
writeGlobalRulesFunction · 0.45
writeRuntimeSkillsFunction · 0.45
bootstrapKiloSessionMethod · 0.45
ensureRunningMethod · 0.45
callMethod · 0.45

Calls 1

setMethod · 0.65

Tested by 1