vfs-tools

Crates.iovfs-tools
lib.rsvfs-tools
version0.1.0
sourcesrc
created_at2023-05-19 14:48:19.912333
updated_at2023-05-19 14:48:19.912333
descriptionA collection ofttools to work with VFS
homepagehttps://gitlab.com/johlrogge.rs/crates/vfs-tools
repositoryhttps://gitlab.com/johlrogge.rs/crates/vfs-tools
max_upload_size
id868908
size8,126
Joakim Ohlrogge (johlrogge)

documentation

https://docs.rs/vfs-tools

README

vfs tools

A crate with a few tools to make the use of vfs a bit more convenient.

Macros

[setup_files] is a macro for preparing a MemoryFS with contents. This macro is intended for testing.

use vfs_tools::setup_files;
let root_path = setup_files! {
  some/path/"file1": b"contents of file1"
  some/path/"file2": b"contents of file2"
  some/other/path/"file3": b"contents of file3"
}?;
let mut result = String::new();
root_path.join("some/path/file2")?.open_file()?.read_to_string(&mut result)?;
assert_eq!("contents of file2", result);
# Ok::<(),::vfs::error::VfsError>(())

extensions

[VfsPathExt] contains extensions to [vfs::VfsPath]

Commit count: 17

cargo fmt