Trait vfs::filesystem::FileSystem [−][src]
File system implementations mus implement this trait
Required methods
fn read_dir(&self, path: &str) -> VfsResult<Box<dyn Iterator<Item = String>>>
[src]
Iterates over all entries of this directory path
fn create_dir(&self, path: &str) -> VfsResult<()>
[src]
Creates the directory at this path
Note that the parent directory must exist.
fn open_file(&self, path: &str) -> VfsResult<Box<dyn SeekAndRead>>
[src]
Opens the file at this path for reading
fn create_file(&self, path: &str) -> VfsResult<Box<dyn Write>>
[src]
Creates a file at this path for writing
fn append_file(&self, path: &str) -> VfsResult<Box<dyn Write>>
[src]
Opens the file at this path for appending
fn metadata(&self, path: &str) -> VfsResult<VfsMetadata>
[src]
Returns the file metadata for the file at this path
fn exists(&self, path: &str) -> VfsResult<bool>
[src]
Returns true if a file or directory at path exists, false otherwise
fn remove_file(&self, path: &str) -> VfsResult<()>
[src]
Removes the file at this path
fn remove_dir(&self, path: &str) -> VfsResult<()>
[src]
Removes the directory at this path
Provided methods
fn copy_file(&self, _src: &str, _dest: &str) -> VfsResult<()>
[src]
Copies the src path to the destination path within the same filesystem (optional)
fn move_file(&self, _src: &str, _dest: &str) -> VfsResult<()>
[src]
Moves the src path to the destination path within the same filesystem (optional)
fn move_dir(&self, _src: &str, _dest: &str) -> VfsResult<()>
[src]
Moves the src directory to the destination path within the same filesystem (optional)