#virtual #virtual-memory #memory #vfs #zip-archive

virtual-filesystem

A virtual filesystem implemented in Rust

3 releases

0.1.2 Apr 15, 2024
0.1.1 Jan 26, 2024
0.1.0 Jan 26, 2024

#514 in Filesystem

Download history 9/week @ 2024-01-22 1/week @ 2024-02-19 34/week @ 2024-02-26 17/week @ 2024-03-11 28/week @ 2024-04-01 195/week @ 2024-04-15

223 downloads per month

Custom license

81KB
1.5K SLoC

Virtual Filesystems for Rust

This crate defines and implements various virtual filesystems for Rust. It's loosely inspired by the vfs crate with a focus on conformity with std.

virtual-fs has the following FileSystems implemented out of the box:

  • PhysicalFS: A read-write physical filesystem mounted at a directory. Path traversal outside the root is permitted.
  • SandboxedPhysicalFS: A read-write physical filesystem that guards against traversal through backtracking and symbolic link traversal.
  • MemoryFS: A read-write in-memory filesystem.
  • RocFS: A "read-only collection" filesystem. This filesystem is similar to OverlayFS, but is read-only. This filesystem searches filesystems in mount-order for files, allowing multiple filesystems to be mounted at once.
  • MountableFS: A read-write filesystem that supports mounting other filesystems at given paths.
  • ZipFS: A read-only filesystem that mounts a ZIP archive, backed by the zip crate.
  • TarFS A read-only filesystem that mounts a Tarball, backed by the tar crate.

Dependencies

~8–17MB
~234K SLoC