5
0
mirror of git://git.proxmox.com/git/pxar.git synced 2024-12-22 21:33:50 +03:00

doc update

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2020-06-22 11:39:17 +02:00
parent 515cdc4bb4
commit 4af1594473
2 changed files with 6 additions and 2 deletions

View File

@ -170,7 +170,9 @@ impl<T: Clone + ReadAt> Directory<T> {
})
}
/// Lookup an entry in a directory.
/// Lookup an entry starting from this current directory.
///
/// For convenience, this already resolves paths with multiple components.
pub async fn lookup<P: AsRef<Path>>(&self, path: P) -> io::Result<Option<FileEntry<T>>> {
if let Some(file_entry) = self.inner.lookup(path.as_ref()).await? {
Ok(Some(FileEntry { inner: file_entry }))

View File

@ -217,7 +217,9 @@ impl<T: Clone + ReadAt> Directory<T> {
})
}
/// Lookup an entry in a directory.
/// Lookup an entry starting from this current directory.
///
/// For convenience, this already resolves paths with multiple components.
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()))? {
Ok(Some(FileEntry { inner: file_entry }))