Struct ole::Reader
[−]
[src]
pub struct Reader<'ole> { /* fields omitted */ }
An OLE file reader.
The parsing method follows the same method described here: http://www.openoffice.org/sc/compdocfileformat.pdf
Basic Example
use ole::Reader; let mut reader = Reader::from_path("assets/Thumbs.db").unwrap(); println!("This OLE file stores the following entries: "); for entry in reader.iterate() { println!("{}", entry); }
Methods
impl<'ole> Reader<'ole>
[src]
pub fn new<T: 'ole>(readable: T) -> Result<Reader<'ole>, Error> where
T: Read,
[src]
T: Read,
Constructs a new Reader
.
Examples
use ole; let mut my_resume = std::fs::File::open("assets/Thumbs.db").unwrap(); let mut parser = ole::Reader::new(my_resume).unwrap();
pub fn from_path(path: &str) -> Result<Reader, Error>
[src]
Constructs a new Reader
from a file.
Examples
use ole; let mut parser = ole::Reader::from_path("assets/Thumbs.db").unwrap();
ⓘImportant traits for OLEIterator<'a>pub fn iterate(&self) -> OLEIterator
[src]
ⓘImportant traits for OLEIterator<'a>
Returns an iterator for directory entries of the OLE file.
Examples
use ole; let mut parser = ole::Reader::from_path("assets/Thumbs.db").unwrap(); for entry in parser.iterate() { println!("Entry {}", entry.name()); }
impl<'ole> Reader<'ole>
[src]
pub fn get_entry_slice(&self, entry: &Entry) -> Result<EntrySlice, Error>
[src]
Returns the slice for the entry.