HostDirRead

Trait HostDirRead 

Source
pub trait HostDirRead<F: HostFileRead> {
    type Id: Hash + Eq + Ord;

    // Required methods
    fn next_entry(&mut self) -> Option<Result<HostDirEntry, IoError>>;
    fn open_file(&mut self, name: &FileName) -> Result<F, IoError>;
    fn open_dir(
        &mut self,
        name: &FileName,
    ) -> Result<(Self, Option<Self::Id>), IoError>
       where Self: Sized;
}
Expand description

Host directory reader.

Required Associated Types§

Source

type Id: Hash + Eq + Ord

Unique identifier of the file/directory.

On UNIX this is (device id, inode). Used to handle file system loops.

Required Methods§

Source

fn next_entry(&mut self) -> Option<Result<HostDirEntry, IoError>>

Source

fn open_file(&mut self, name: &FileName) -> Result<F, IoError>

Source

fn open_dir( &mut self, name: &FileName, ) -> Result<(Self, Option<Self::Id>), IoError>
where Self: Sized,

Implementors§