From c0c142dc0441be6298c5d3cba4879f1828779256 Mon Sep 17 00:00:00 2001 From: smndtrl Date: Mon, 26 Jun 2023 13:27:45 +0000 Subject: [PATCH 1/2] open_stream --- src/lib.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index c3f1d1e..dea7960 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -307,7 +307,15 @@ impl CompoundFile { self.open_stream_with_path(path.as_ref()) } - fn open_stream_with_path(&mut self, path: &Path) -> io::Result> { + /// Rads an existing stream in the compound file for reading + pub fn read_stream>( + &self, + path: P, + ) -> io::Result> { + self.open_stream_with_path(path.as_ref()) + } + + fn open_stream_with_path(&self, path: &Path) -> io::Result> { let names = internal::path::name_chain_from_path(path)?; let path = internal::path::path_from_name_chain(&names); let stream_id = match self.stream_id_for_name_chain(&names) { From 7107d1e5db382595f4968aa7d64a7c8f397a2212 Mon Sep 17 00:00:00 2001 From: smndtrl Date: Mon, 26 Jun 2023 13:28:46 +0000 Subject: [PATCH 2/2] fix typo --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index dea7960..3614fd9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -307,7 +307,7 @@ impl CompoundFile { self.open_stream_with_path(path.as_ref()) } - /// Rads an existing stream in the compound file for reading + /// Reads an existing stream in the compound file for reading pub fn read_stream>( &self, path: P,