Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
binary_tree_array::search_by(&self.table, start, skip, |i| hash.cmp(&i.hash))
}
- async fn lookup_self(&self) -> io::Result<FileEntryImpl<T>> {
+ pub async fn lookup_self(&self) -> io::Result<FileEntryImpl<T>> {
let (entry, _decoder) = self.decode_one_entry(self.entry_range(), None).await?;
Ok(FileEntryImpl {
input: self.input.clone(),
)?))
}
+ /// Get a `FileEntry` referencing the directory itself.
+ ///
+ /// Helper function for our fuse implementation.
+ pub fn lookup_self(&self) -> io::Result<FileEntry<T>> {
+ Ok(FileEntry {
+ inner: poll_result_once(self.inner.lookup_self())?,
+ })
+ }
+
/// Lookup an entry in a directory.
pub fn lookup<P: AsRef<Path>>(&self, path: P) -> io::Result<Option<FileEntry<T>>> {
if let Some(file_entry) = poll_result_once(self.inner.lookup(path.as_ref()))? {