Skip to main content

Module run

Module run 

Source
Expand description

One pass of a dated upload (see crate::dated).

For each file, cheapest check first:

  1. Same size and modification time as the index records → done, unread.
  2. Read it (SHA-256 + MD5 in one pass; a RAW file whole). Same content as the index records → re-record it (touched or copied), done.
  3. Content already on SmugMug (the hash store knows it) → link it if it’s in its day’s albums, else collect it there. A RAW file isn’t rendered.
  4. A RAW file whose rendered JPEG is what this path uploaded last time (metadata-only edit) → re-record, no upload.
  5. Changed content at a path that was uploaded → replace that image, unless another path shares it (then upload anew).
  6. Otherwise upload into the day’s album, under its own name, or renamed if a different photo has that name there.

Structs§

RunOptions
RunStats
How a run went. Serialized as the backup’s last_run.json.

Enums§

Content
What a new upload carries.

Traits§

Uploads
Sending files to SmugMug.

Functions§

human_bytes
run
Run once over options.sources.

Type Aliases§

StopFlag
Set to stop a run early: no new files are read; files already read are finished.