Skip to main content

Module session

Module session 

Source
Expand description

Opening an archive for extraction and working out whether it fits. Shared by the command line and the GUI, so the two never disagree.

Structs§

SpacePlan
Whether an extraction fits, in the numbers a person needs to decide.

Enums§

State

Functions§

begin
Commits to a fresh extraction: saves the archive’s tail and writes the journal. From here on the archive may be truncated.
clear_uncommitted
Before continuing a crashed run, deletes what it wrote for batches it never committed.
default_output
game.zip, game.7z.001 and game.tar.gz all extract into game, next to them.
display_name
game.zip, or game.7z.001 (+4 more parts) for a split archive.
locate
The first volume of the archive and where its journal lives. Paths are made absolute so a resume works from any directory.
open
writable is false for anything that only looks, so it works on read-only media and never takes the lock. For a fresh extraction the output folder may already hold other files, but nothing in the archive may land on top of one. password only matters for encrypted archives; see open_encrypted for the ask-and-retry loop front ends want.
open_encrypted
Opens an archive that may be encrypted. ask is called whenever a password is needed or the last one was wrong, and returns None to give up. Archives with a password are proven with Job::check_password before this returns, so nothing is deleted on a wrong guess. Returns the state and the password that worked.
plan