pub struct ArchiveBuilder<R: Read + Unpin> { /* private fields */ }Expand description
Configure the archive.
Implementations§
Source§impl<R: Read + Unpin> ArchiveBuilder<R>
impl<R: Read + Unpin> ArchiveBuilder<R>
Sourcepub fn set_unpack_xattrs(self, unpack_xattrs: bool) -> Self
pub fn set_unpack_xattrs(self, unpack_xattrs: bool) -> Self
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.
Sourcepub fn set_preserve_permissions(self, preserve: bool) -> Self
pub fn set_preserve_permissions(self, preserve: bool) -> Self
Indicate whether the permissions on files and directories are preserved when unpacking this entry.
This flag is disabled by default and is currently only implemented on Unix.
Sourcepub fn set_overwrite(self, overwrite: bool) -> Self
pub fn set_overwrite(self, overwrite: bool) -> Self
Indicate whether files and symlinks should be overwritten on extraction.
Sourcepub fn set_preserve_mtime(self, preserve: bool) -> Self
pub fn set_preserve_mtime(self, preserve: bool) -> Self
Indicate whether access time information is preserved when unpacking this entry.
This flag is enabled by default.
Sourcepub fn set_ignore_zeros(self, ignore_zeros: bool) -> Self
pub fn set_ignore_zeros(self, ignore_zeros: bool) -> Self
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.
Sourcepub fn set_allow_external_symlinks(self, allow_external_symlinks: bool) -> Self
pub fn set_allow_external_symlinks(self, allow_external_symlinks: bool) -> Self
Indicate whether to deny symlinks that point outside the destination directory when unpacking this entry. (Writing to locations outside the destination directory is always forbidden.)
This flag is enabled by default.