Struct ubiquity::archive::ArchiveFile
[−]
[src]
pub struct ArchiveFile { // some fields omitted }
Abstracts over operations on a single archive file. Remember each 'file' in the archive represents an entire directory (not recursive) in the replicas.
Methods
impl ArchiveFile
[src]
fn remove_all(&mut self) -> Result<(), Error>
Remove all entries from this file. This just slightly more efficient than writing an empty Vec.
fn read<AL: ArchiveLen>(&mut self) -> Result<ArchiveEntries<AL>, ReadError>
Reads the archive entries into a Vec This may acquire (or wait for) a lock, ensuring that multiple threads/processes aren't reading/writing to/from the same archive file.
fn write<AL: ArchiveLen>(&mut self, entries: &mut ArchiveEntries<AL>) -> Result<(), WriteError>
Writes entries to disk