pub struct ExtractedArchive { /* private fields */ }Expand description
Extraction output whose private directory is emptied when dropped.
The private root directory itself is never removed by this crate; it is left in place as an empty directory for the caller to remove.
Implementations§
Source§impl ExtractedArchive
impl ExtractedArchive
Sourcepub fn members(&self) -> &[ExtractedMember]
pub fn members(&self) -> &[ExtractedMember]
Returns member evidence in declaration order.
Sourcepub fn persist(self) -> PersistedExtraction
pub fn persist(self) -> PersistedExtraction
Transfers cleanup responsibility to the caller after transaction preparation or another explicit ownership handoff.
Sourcepub fn cleanup(self) -> Result<(), ExtractionError>
pub fn cleanup(self) -> Result<(), ExtractionError>
Empties the operation-owned extraction root through the retained root handle.
The crate empties the owned tree through the retained directory handle. It never removes the root directory itself and never traverses the root pathname, so a foreign directory, file, symlink, or reparse point installed at the recorded pathname is never touched.
§Contract
Okmeans the owned root object held no entries at the final handle-relative listing: the owned tree was emptied.ErrwithExtractionErrorKind::CleanupFailedmeans the owned root could not be fully emptied. The residue may be partially emptied, its emptiness is not guaranteed, andExtractionError::residue_pathnames the recorded root path.
The residual directory is the caller’s to remove: this crate never
removes it and offers no convenience that removes it by pathname.
Because this call consumes the value, capture the residual path from
root before calling it.
The recorded root path is advisory: if the root was renamed or replaced by a third party, the crate emptied the owned object and left whatever occupies the recorded pathname untouched.