Import std.compress.vfs
std.compress.vfs
std.compress's zips in std.io's virtual file system: a ZipSource reads a zip's files as a VfsSource, and a Vfs's MountZip mounts one, as a game mounts its pak files.
std/compress/vfs.fb
Types
ZipSource
class
Public Class ZipSource Implements VfsSource
A zip's files as a source, by their names: each file's name is its path, with '/' (or '') between folders, and the folders are the ones its entries name or go through. An entry whose name goes above the zip's root, or has no names once its "."s and ".."s are taken out, isn't in it, so a zip can't reach past where it's mounted, and neither is a link. Of the entries a name has, the last is the file, as ZipReader.Read takes it. A read decompresses the file from the zip each time.
-
A source of the zip a ZipReader reads, which it keeps. Throws an IOError of INVALID_DATA when the zip's entries make one place a file and a folder too.
-
The bytes of the file at
path, or Null when there's no file there.Doc from
std.io.vfs.VfsSource.Read. -
What's at
path, or Null when nothing is.Doc from
std.io.vfs.VfsSource.KindAt. -
The names of what's in the folder at
path, and their kinds, in any order, or Null when there's no folder there.Doc from
std.io.vfs.VfsSource.List.
Extends
Vfs
extend
Extend Vfs
No doc comment.
-
Mounts the zip in
data, which it copies, atat, as a ZipSource. Throws an IOError of INVALID_DATA when thedataisn't a zip, or ends too soon, or as a ZipSource does, and panics for a path that goes above the root, as Mount does.
Report an issue with this page or with FutureBlitz on GitHub.