boxfs-memfs
In-memory file system back-end for filesystem-rs, built on imbl persistent trees.
Overview
MemFs implements boxfs_api::Fuse, boxfs_api::Volume, and boxfs_api::Snapshot purely in memory with structural sharing:
MemFs::new(read_only)(orMemFs::default()for a writable instance) creates an empty in-memory file system.- The inode table is an
imbl::HashMap, makingSnapshot::snapshot,Snapshot::branch, andSnapshot::restore$O(1)$ Copy-on-Write clones. - Directories and extended attributes are
imbl::OrdMaps that share unchanged subtrees across snapshots and branches. - Regular file contents are stored as an
imbl::Vectorof 4 KiB pages (Option<Arc<[u8; 4096]>>, whereNonerepresents a sparse zero page), so modifying a file after a snapshot copies only the touched 4 KiB pages.
License
MIT