pub trait DirRead: Send + Sync {
    type FileEntry;
    type Lock: Dir;

    fn contains(&self, name: &PathSegment) -> bool;
    fn get_dir(&self, name: &PathSegment) -> TCResult<Option<Self::Lock>>;
    fn get_file<F, B>(&self, name: &Id) -> TCResult<Option<F>>
   where
        Self::FileEntry: AsType<F>,
        B: BlockData,
        F: File<B>
; fn is_empty(&self) -> bool; }
Expand description

A read lock on a Dir

Required Associated Types

The type of a file entry in this Dir

The type of lock used to guard subdirectories in this Dir

Required Methods

Return true if this directory has an entry at the given PathSegment.

Look up a subdirectory of this Dir.

Get a File in this Dir.

Return true if there are no files or subdirectories in this Dir.

Implementors