Struct cfb::CompoundFile
[−]
[src]
pub struct CompoundFile<F> { /* fields omitted */ }
Methods
impl<F> CompoundFile<F>
[src]
fn version(&self) -> Version
Returns the CFB format version used for this compound file.
fn entry<P: AsRef<Path>>(&self, path: P) -> Result<Entry>
Given a path within the compound file, get information about that stream or storage object.
fn read_storage<P: AsRef<Path>>(&self, path: P) -> Result<Entries>
Returns an iterator over the entries within a storage object.
fn into_inner(self) -> F
Consumes the CompoundFile
, returning the underlying reader/writer.
impl<F: Seek> CompoundFile<F>
[src]
fn open_stream<P: AsRef<Path>>(&mut self, path: P) -> Result<Stream<F>>
Opens an existing stream in the compound file for reading and/or writing (depending on what the underlying file supports).
impl<F: Read + Seek> CompoundFile<F>
[src]
fn open(inner: F) -> Result<CompoundFile<F>>
Opens an existing compound file, using the underlying reader. If the
underlying reader also supports the Write
trait, then the
CompoundFile
object will be writable as well.
impl<F: Read + Write + Seek> CompoundFile<F>
[src]
fn create(inner: F) -> Result<CompoundFile<F>>
Creates a new compound file with no contents, using the underlying reader/writer. The reader/writer should be initially empty.
fn create_with_version(version: Version, inner: F) -> Result<CompoundFile<F>>
Creates a new compound file of the given version with no contents, using the underlying writer. The writer should be initially empty.
fn create_storage<P: AsRef<Path>>(&mut self, path: P) -> Result<()>
Creates a new, empty storage object (i.e. "directory") at the provided path. The parent storage object must already exist.
fn create_stream<P: AsRef<Path>>(&mut self, path: P) -> Result<Stream<F>>
Creates and returns a new, empty stream object at the provided path. The parent storage object must already exist.
fn touch<P: AsRef<Path>>(&mut self, path: P) -> Result<()>
Sets the modified time for the object at the given path to now. Has no effect when called on the root storage.
fn flush(&mut self) -> Result<()>
Flushes all changes to the underlying file.