Skip to main content

remove

Function remove 

Source
pub fn remove(validated: &Validated) -> Result<(), RkError>
Expand description

Remove the validated stage through its held descriptors.

Every entry below it goes first, then the directory entry itself, quarantined under an unpredictable name inside its validated parent, judged against the validated identity, and removed only on a match.

§Errors

Any removal failure, and an I/O failure naming the entry where the tree changed under the removal: a child whose opened identity differs from the one checked, a name that vanished after validation, an entry that gained content after it was emptied, or a parent entry replaced while the stage was being emptied. In the last case the validated directory’s contents are gone and the entry now under the quarantine name was left alone.