Skip to main content

nested_offer

Function nested_offer 

Source
pub fn nested_offer(path: &Path, written: &HashSet<PathBuf>) -> Option<PathBuf>
Expand description

The archive a finished run offers to extract for path, one of the files in written, the files it wrote: the first volume of its set, so a set is offered once whichever volume is asked about. None unless path and that first volume are archives by name and signature, and every volume of the set is in written (volumes_written). A native split ZIP is found by its .z01, whose split marker no other check names.

An archive with progress files next to it (a journal, its tail or folder list, a split ZIP’s stub) is never offered, even when the run wrote them: a resume would follow what they say, not what the person was offered. A split ZIP is also opened read only, so a set whose index names more segments than are there is not offered.