src/pxar/decoder.rs: make read_directory_entry usable by fuse
... and thereby allow it to read a single directory entry based on the start and end archive offsets. Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
parent
3f7f4f34be
commit
ac12570e99
|
@ -75,7 +75,11 @@ impl<R: Read + Seek, F: Fn(&Path) -> Result<(), Error>> Decoder<R, F> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn read_directory_entry(&mut self, start: u64, end: u64) -> Result<DirectoryEntry, Error> {
|
pub(crate) fn read_directory_entry(
|
||||||
|
&mut self,
|
||||||
|
start: u64,
|
||||||
|
end: u64,
|
||||||
|
) -> Result<DirectoryEntry, Error> {
|
||||||
self.seek(SeekFrom::Start(start))?;
|
self.seek(SeekFrom::Start(start))?;
|
||||||
|
|
||||||
let head: PxarHeader = self.inner.read_item()?;
|
let head: PxarHeader = self.inner.read_item()?;
|
||||||
|
|
Loading…
Reference in New Issue