Import std.compress.vfs
Vfs
extend
Extend Vfs
Mounting a zip in a Vfs, as its files.
-
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 early, or as a ZipSource does, and panics for a path that goes above the root, as Mount does.Examples
Local zip = ZipWriter() zip.Add("levels/one.txt", "first".Bytes) Local files = Vfs() Try files.MountZip(Path("data"), zip.Finish()) Expect(Try files.ReadText(Path("data/levels/one.txt")) == "first") Expect(files.DirExists(Path("data/levels")))
Report an issue with this page or with FutureBlitz on GitHub.