pub trait FileSystem:
Send
+ Sync
+ Debug {
// Required methods
fn read_dir(&self, dir: &Path) -> Result<Vec<DirItem>>;
fn metadata(&self, path: &Path) -> Result<Meta>;
fn read(&self, path: &Path, limit: usize) -> Result<Vec<u8>>;
// Provided methods
fn can_create_dirs(&self) -> bool { ... }
fn create_dir(&self, _path: &Path) -> Result<()> { ... }
fn is_native(&self) -> bool { ... }
fn is_dir(&self, path: &Path) -> bool { ... }
fn is_file(&self, path: &Path) -> bool { ... }
}Expand description
What the picker and the preview providers read from.
Required Methods§
Provided Methods§
Sourcefn can_create_dirs(&self) -> bool
fn can_create_dirs(&self) -> bool
Whether it can make folders (FileSystem::create_dir): the
picker’s New folder is disabled, with the reason, when it cannot.
Sourcefn create_dir(&self, _path: &Path) -> Result<()>
fn create_dir(&self, _path: &Path) -> Result<()>
Makes a folder, whose parent exists. By default it cannot.
Sourcefn is_native(&self) -> bool
fn is_native(&self) -> bool
Whether its paths are the system’s own, so that other programs (a system thumbnailer) can open them.