Commit a57ee14
committed
vfs: add archive provider backed by ZipBuffer/ZipFile
Adds an ArchiveProvider to node:vfs that mounts a ZipBuffer or ZipFile as
a virtual file system, built on the writable ZipBuffer/ZipFile support
added to node:zlib. provider.readonly reflects the underlying archive's
own writability.
Directories are recognized both explicitly (an entry name ending in /)
and implicitly (any entry name starting with "<dir>/"). Since a ZIP
member can't be edited or read in place, writes are buffered in memory
and only committed - as a new archive entry - when the file handle is
closed.
Every method has a synchronous counterpart backed by ZipBuffer/ZipFile's
own synchronous surface, documented as event-loop-blocking like the rest
of node:vfs's providers.1 parent c7a3f01 commit a57ee14
4 files changed
Lines changed: 824 additions & 0 deletions
File tree
- doc/api
- lib
- internal/vfs/providers
- test/parallel
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
307 | 356 | | |
308 | 357 | | |
309 | 358 | | |
| |||
318 | 367 | | |
319 | 368 | | |
320 | 369 | | |
| 370 | + | |
321 | 371 | | |
322 | 372 | | |
323 | 373 | | |
324 | 374 | | |
325 | 375 | | |
326 | 376 | | |
327 | 377 | | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
0 commit comments