Skip to main content

snapshot

Function snapshot 

Source
pub fn snapshot(
    engine: &Engine,
    paths: &WorkspacePaths,
    user: HostUser,
    skip: &[String],
) -> Result<Snapshot, BackupError>
Expand description

Backs the workspace up, leaving out every folder or file of skip as well as what the workspace’s own .gitignore leaves out.

Makes Backup/ the first time. When another QCode is backing the same workspace up at this moment the round is skipped: the two would only race for git’s own lock.

§Errors

An entry of skip that is not a path inside the workspace, before anything runs; a Backup/ that cannot be made; and the engine’s or git’s own words when the job fails.