Skip to main content

DirectoryFileSystem

Trait DirectoryFileSystem 

Source
pub trait DirectoryFileSystem: FileSystem {
    // Required methods
    fn create_dir_one(&mut self, path: &Path, mode: u32) -> VfResult<()>;
    fn read_dir_one(
        &mut self,
        path: &Path,
        options: ReadDirOptions,
    ) -> VfResult<Vec<DirEntry>>;

    // Provided method
    fn visit_dir_one(
        &mut self,
        path: &Path,
        options: ReadDirOptions,
        callback: &mut dyn FnMut(DirEntry) -> VfResult<bool>,
    ) -> VfResult<()> { ... }
}
Expand description

Directory creation and enumeration.

Required Methods§

Source

fn create_dir_one(&mut self, path: &Path, mode: u32) -> VfResult<()>

Source

fn read_dir_one( &mut self, path: &Path, options: ReadDirOptions, ) -> VfResult<Vec<DirEntry>>

Provided Methods§

Source

fn visit_dir_one( &mut self, path: &Path, options: ReadDirOptions, callback: &mut dyn FnMut(DirEntry) -> VfResult<bool>, ) -> VfResult<()>

Visit entries incrementally. The default scalar fallback may still materialize a bounded listing; vector backends can page lazily.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§