Trait tc_transact::fs::DirRead
source · [−]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
Required Methods
sourcefn contains(&self, name: &PathSegment) -> bool
fn contains(&self, name: &PathSegment) -> bool
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
.