(
path: string,
sources: string[]
)
| 308 | } |
| 309 | |
| 310 | async createArchive( |
| 311 | path: string, |
| 312 | sources: string[] |
| 313 | ): Promise<StateArchiveCreateResult> { |
| 314 | const entries = await this.collectArchiveEntries(sources); |
| 315 | const tar = buildTar(entries); |
| 316 | await this.writeFileBytes(path, tar); |
| 317 | return { |
| 318 | path, |
| 319 | entries: entries.map((entry) => ({ |
| 320 | path: entry.path, |
| 321 | type: entry.type, |
| 322 | size: entry.type === "file" ? entry.bytes.byteLength : 0 |
| 323 | })), |
| 324 | bytesWritten: tar.byteLength |
| 325 | }; |
| 326 | } |
| 327 | |
| 328 | async listArchive(path: string): Promise<StateArchiveEntry[]> { |
| 329 | return listTar(await this.readFileBytes(path)); |
nothing calls this directly
no test coverage detected