MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / writeMigratedDoc

Function writeMigratedDoc

projects/electron/src/modules/code/yjsStorage.ts:111–116  ·  view source on GitHub ↗
(filePath: string, data: Uint8Array)

Source from the content-addressed store, hash-verified

109}
110
111async function writeMigratedDoc(filePath: string, data: Uint8Array): Promise<void> {
112 await ensureStorageDir()
113 const tempPath = `${filePath}.tmp.${Date.now()}.${Math.random().toString(36).slice(2)}`
114 await fs.writeFile(tempPath, data)
115 await fs.rename(tempPath, filePath)
116}
117
118// ============================================================================
119// Storage Operations

Callers 1

handleLoadFunction · 0.70

Calls 2

ensureStorageDirFunction · 0.85
writeFileMethod · 0.80

Tested by

no test coverage detected