pub trait DirEntrySink {
// Required method
fn accept(
&mut self,
name: &str,
ino: u64,
node_type: NodeType,
offset: u64,
) -> bool;
}Expand description
A trait for a sink that can receive directory entries.
Required Methods§
Sourcefn accept(
&mut self,
name: &str,
ino: u64,
node_type: NodeType,
offset: u64,
) -> bool
fn accept( &mut self, name: &str, ino: u64, node_type: NodeType, offset: u64, ) -> bool
Accept a directory entry, returns false if the sink is full.
offset is the offset of the next entry to be read.
It’s not recommended to operate on the node inside the accept
function, since some filesystem may impose a lock while iterating the
directory, and operating on the node may cause deadlock.