Crates.io | vfs |
lib.rs | vfs |
version | 0.12.0 |
source | src |
created_at | 2016-05-14 12:00:47.491017 |
updated_at | 2024-03-09 16:06:05.562623 |
description | A virtual filesystem for Rust |
homepage | |
repository | https://github.com/manuel-woelker/rust-vfs |
max_upload_size | |
id | 5064 |
size | 325,138 |
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:
embedded-fs
feature, no async version availableThe minimum supported Rust version (MSRV) is 1.63.
Comments and pull-requests welcome!
Arc<str>
for paths internally to reduce string allocations - thanks @BrettMayson!async_vfs
.
The module is behind the async-vfs
feature flag which is not enabled by default. Huge thank you to @Fredrik Reinholdsen!Path::create_dir_all()
failures when executing in parallel
(fixes #47)VfsPath::join()
(#45 - thanks @Property404)VfsPath::is_root()
(#44 - thanks @Property404)Path::join()
now allows resolving '..' at the root (resolving to root itself)
(#41 - thanks @Property404)Send
to trait objects returned from APIs
(#40,
#46 - thanks @Property404)std::error::Error
for VfsError
(#32) and improved error
ergonomics for end users (#34) - thanks @TechnohackerMemoryFS::append_file()
(closes
#31)EmbeddedFS
to rust-embed
v6 (closes #29)OverlayFS
and AltrootFS
available at the crate root, making it more consistent
(PR #30 -
thanks @Zyian)embedded-fs
feature when building on docs.rs to ensure that it actually shows up there
(#28 - thanks @Absolucy)VfsPath::root()
method to access the root path of a virtual filesystem
(closes #26)VfsPath
docs to provide usage examplesEmbeddedFS
(closes #24)test_vfs_readonly!
which allows verifying read-only filesystem implementationsthiserror
crate to improve compile times
(closes #25)OverlayFS
(closes #23)VfsPath::join()
now takes AsReftest_vfs
macro via the feature flag export-test-macros
to allow downstream implementations to verify
expected behaviourEmbeddedFS
for using filesystems embeded in the binary using
rust-embed
(PR #12 - thanks @ahouts)VfsPath::exists()
to return VfsResult<bool>
instead of plain bool
(closes #17)OverlayFS
union filesystemVfsPath::read_to_string()
convenience methodVfsPath::walk_dir()
method for recursive directory traversalVfsPath::{copy,move}_{file,dir}()
methods (closes #9)AltrootFS
(thanks @icefoxen)