pub trait FileSystem:
Send
+ Sync
+ Debug {
// Required methods
fn read(&self, path: &Path) -> Result<Arc<str>, LoadError>;
fn exists(&self, path: &Path) -> bool;
fn is_encrypted(&self, path: &Path) -> bool;
fn normalize(&self, path: &Path) -> PathBuf;
// Provided method
fn glob(&self, pattern: &str) -> Result<Vec<PathBuf>, String> { ... }
}Expand description
Abstract file system interface for file loading.
This trait allows the loader to work with different file system backends:
DiskFileSystem: Reads from the actual filesystem (default)VirtualFileSystem: Reads from an in-memory file map (for WASM)
Required Methods§
Sourcefn is_encrypted(&self, path: &Path) -> bool
fn is_encrypted(&self, path: &Path) -> bool
Check if a path is a GPG-encrypted file.
For virtual filesystems, this always returns false since encrypted files should be decrypted before being added.