(filePath: string, data: Uint8Array)
| 109 | } |
| 110 | |
| 111 | async 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 |
no test coverage detected