pub struct ControlTarReader { /* private fields */ }
Expand description

A reader for control.tar files.

Implementations

Obtain the entries in the control.tar file.

This can only be called once, immediately after the reader/archive is opened. It is a glorified wrapper around tar::Archive::entries() and has the same semantics.

Methods from Deref<Target = Archive<Box<dyn Read>>>

Construct an iterator over the entries in this archive.

Note that care must be taken to consider each entry within an archive in sequence. If entries are processed out of sequence (from what the iterator returns), then the contents read for each entry may be corrupted.

Unpacks the contents tarball into the specified dst.

This function will iterate over the entire contents of this tarball, extracting each file in turn to the location specified by the entry’s path name.

This operation is relatively sensitive in that it will not write files outside of the path specified by dst. Files in the archive which have a ‘..’ in their path are skipped during the unpacking process.

Examples
use std::fs::File;
use tar::Archive;

let mut ar = Archive::new(File::open("foo.tar").unwrap());
ar.unpack("foo").unwrap();

Indicate whether extended file attributes (xattrs on Unix) are preserved when unpacking this archive.

This flag is disabled by default and is currently only implemented on Unix using xattr support. This may eventually be implemented for Windows, however, if other archive implementations are found which do this as well.

Indicate whether extended permissions (like suid on Unix) are preserved when unpacking this entry.

This flag is disabled by default and is currently only implemented on Unix.

Indicate whether files and symlinks should be overwritten on extraction.

Indicate whether access time information is preserved when unpacking this entry.

This flag is enabled by default.

Ignore zeroed headers, which would otherwise indicate to the archive that it has no more entries.

This can be used in case multiple tar archives have been concatenated together.

Construct an iterator over the entries in this archive for a seekable reader. Seek will be used to efficiently skip over file contents.

Note that care must be taken to consider each entry within an archive in sequence. If entries are processed out of sequence (from what the iterator returns), then the contents read for each entry may be corrupted.

Trait Implementations

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more