Expand description
Implementation of a virtual filesystem with a configurable backend and file watching.
memofs is currently an unstable minimum viable library. Its primary consumer is Rojo, a build system for Roblox.
§Current Features
- API similar to
std::fs - Configurable backends
StdBackend, which usesstd::fsand thenotifycrateNoopBackend, which always throws errorsInMemoryFs, a simple in-memory filesystem useful for testing
§Future Features
- Hash-based hierarchical memoization keys (hence the name)
- Configurable caching (write-through, write-around, write-back)
Structs§
- DirEntry
- Vfs equivalent to
std::fs::DirEntry. - InMemory
Fs - In-memory filesystem that can be used as a VFS backend.
- Metadata
- Vfs equivalent to
std::fs::Metadata. - Noop
Backend VfsBackendthat returns an error on every operation.- ReadDir
- Vfs equivalent to
std::fs::ReadDir. - StdBackend
VfsBackendthat usesstd::fsand thenotifycrate.- Vfs
- A virtual filesystem with a configurable backend.
- VfsLock
- A locked handle to a
Vfs, created byVfs::lock.
Enums§
- VfsEvent
- Represents an event that a filesystem can raise that might need to be handled.
- VfsSnapshot
- A slice of a tree of files. Can be loaded into an
InMemoryFs.
Traits§
- IoResult
Ext - Trait that transforms
io::Result<T>intoio::Result<Option<T>>. - VfsBackend
- Backend that can be used to create a
Vfs.