Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,15 @@ impl<F: Seek> CompoundFile<F> {
self.open_stream_with_path(path.as_ref())
}

fn open_stream_with_path(&mut self, path: &Path) -> io::Result<Stream<F>> {
/// Reads an existing stream in the compound file for reading
pub fn read_stream<P: AsRef<Path>>(
&self,
path: P,
) -> io::Result<Stream<F>> {
self.open_stream_with_path(path.as_ref())
}

fn open_stream_with_path(&self, path: &Path) -> io::Result<Stream<F>> {
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) {
Expand Down