From ac12570e9957f5321056ac8cbe77dea6ecd251e0 Mon Sep 17 00:00:00 2001 From: Christian Ebner Date: Mon, 9 Sep 2019 18:27:23 +0200 Subject: [PATCH] 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 --- src/pxar/decoder.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pxar/decoder.rs b/src/pxar/decoder.rs index 5cec5095..e20b9ceb 100644 --- a/src/pxar/decoder.rs +++ b/src/pxar/decoder.rs @@ -75,7 +75,11 @@ impl Result<(), Error>> Decoder { Ok(()) } - fn read_directory_entry(&mut self, start: u64, end: u64) -> Result { + pub(crate) fn read_directory_entry( + &mut self, + start: u64, + end: u64, + ) -> Result { self.seek(SeekFrom::Start(start))?; let head: PxarHeader = self.inner.read_item()?;