DirEntrySink

Trait DirEntrySink 

Source
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§

Source

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.

Implementors§