Struct conserve::BlockDir
[−]
[src]
pub struct BlockDir { pub path: PathBuf, // some fields omitted }
A readable, writable directory within a band holding data blocks.
Fields
path: PathBuf
Methods
impl BlockDir
[src]
fn new(path: &Path) -> BlockDir
Create a BlockDir accessing path
, which must exist as a directory.
fn store(
&mut self,
from_file: &mut Read,
report: &Report
) -> Result<(Vec<Address>, String)>
&mut self,
from_file: &mut Read,
report: &Report
) -> Result<(Vec<Address>, String)>
fn contains(self: &BlockDir, hash: &str) -> Result<bool>
True if the named block is present in this directory.
fn get(self: &BlockDir, addr: &Address, report: &Report) -> Result<Vec<u8>>
Read back the contents of a block, as a byte array.
TODO: Return a Read rather than a Vec.