diff --git a/src/lib.rs b/src/lib.rs index c3f1d1e..3614fd9 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> { + /// Reads 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) {