Struct ar::Builder
[−]
[src]
pub struct Builder<W: Write> { /* fields omitted */ }
A structure for building archives.
This structure has methods for building up an archive from scratch into any arbitrary writer.
Methods
impl<W: Write> Builder<W>
[src]
fn new(writer: W) -> Builder<W>
[src]
Create a new archive builder with the underlying writer object as the destination of all data written.
fn into_inner(self) -> Result<W>
[src]
Unwrap this archive builder, returning the underlying writer object.
fn append<R: Read>(&mut self, header: &Header, data: R) -> Result<()>
[src]
Adds a new entry to this archive.
fn append_path<P: AsRef<Path>>(&mut self, path: P) -> Result<()>
[src]
Adds a file on the local filesystem to this archive, using the file name as its identifier.
fn append_file(&mut self, name: &[u8], file: &mut File) -> Result<()>
[src]
Adds a file to this archive, with the given name as its identifier.