9 unstable releases (4 breaking)

0.5.1 Mar 14, 2021
0.5.0 Feb 13, 2021
0.4.0 Aug 13, 2020
0.3.0 Aug 3, 2020
0.1.2 May 30, 2016

#61 in Filesystem

Download history 136/week @ 2021-10-04 70/week @ 2021-10-11 95/week @ 2021-10-18 296/week @ 2021-10-25 172/week @ 2021-11-01 86/week @ 2021-11-08 58/week @ 2021-11-15 96/week @ 2021-11-22 101/week @ 2021-11-29 92/week @ 2021-12-06 92/week @ 2021-12-13 44/week @ 2021-12-20 55/week @ 2021-12-27 40/week @ 2022-01-03 86/week @ 2022-01-10 85/week @ 2022-01-17

295 downloads per month
Used in 10 crates (9 directly)

Apache-2.0

110KB
2.5K SLoC

rust-vfs

Crate API Minimum rustc version Actions Status Build Status

A virtual filesystem for Rust

The virtual file system abstraction generalizes over file systems and allows using different filesystem implementations (e.g. an in memory implementation for unit tests)

This crate currently has the following implementations:

  • PhysicalFS - the actual filesystem of the underlying OS
  • MemoryFS - an ephemeral in-memory file system, intended mainly for unit tests
  • AltrootFS - a file system with its root in a particular directory of another filesystem
  • OverlayFS - an overlay file system combining two filesystems, an upper layer with read/write access and a lower layer with only read access
  • EmbeddedFS - a read-only file system embedded in the executable, requires embedded-fs feature

The minimum supported Rust version is 1.40.0.

Comments and pull-requests welcome!

Changelog

0.5.1 (2021-02-13)

  • Exported test_vfs macro via the feature flag export-test-macros to allow downstream implementations to verify expected behaviour
  • The MSRV is now 1.40 due to requirements in upstream crates
  • The embedded implementation was broken by the 0.5.0 API changes, and is now fixed

0.5.0 (2021-02-13)

  • Changed VfsPath::exists() to return VfsResult<bool> instead of plain bool (closes #17)

0.4.0 (2020-08-13)

  • Added OverlayFS union filesystem
  • Added VfsPath::read_to_string() convenience method
  • Added VfsPath::walk_dir() method for recursive directory traversal
  • Added VfsPath::{copy,move}_{file,dir}() methods (closes #9)
  • License is now Apache 2.0
  • Minimum supported Rust version (MSRV) is 1.32.0

0.3.0 (2020-08-04)

  • Refactored to use a trait based design, simplifying usage and testing

0.2.1 (2020-02-06)

0.1.0 (2016-05-14)

  • Initial release

Roadmap

  • Support for read-only filesystems
  • Support for re-mounting filesystems
  • Support for virtual filesystem access inside archives (e.g. zip)

Dependencies

~0.3–1MB
~19K SLoC