Expand description
Files downloaded before the store, moved into it: checked against their hash, sealed under fresh parameters, then taken out of the download folder. Resumable by construction: a file is either still a download on disk or already the store’s. An original goes only once its kept copy has been read back whole and the database that points at it is on disk.
Structs§
- Elsewhere
- What another account on this device still shows: by path, and by content where its path is stale (an account that hasn’t logged in since its download folder moved).
- OnDisk
- A download still shown from its own file in the download folder.
- Settled
- What a settle did with the originals owed.
Enums§
- Moved
- What became of one file.
Functions§
- elsewhere
- What every other account on this device shows, and every file the user saved. None when one can’t be read, so nothing is deleted on a guess.
- move_in
- Keep one file and point its messages at the kept copy. Returns what became of it and the
events whose rows changed; on
Movedthe original is owed, and goes oncesettlehas made those rows durable. Nothing here deletes a file the user had. - on_disk
- This account’s downloads that still sit in one of Vector’s folders, one per file.
- reclaim_
unmarked - Rows that name a file in one of Vector’s folders without marking it downloaded, as older versions often left them. Each whose file holds exactly its bytes is marked downloaded, so moving in and letting go treat it as any other download. Returns how many were marked.
- reflect
- Loaded messages follow a moved file as its rows did: those of its hash show the store’s copy, any claiming other bytes there lose the download; for bytes that weren’t the message’s, only rows of its hash let go. Returns each changed message as (chat id, message).
- reflect_
released - Loaded messages stop showing a released file.
- release
- Let a download go when media isn’t kept: the file goes, then the rows that showed it, so a crash between leaves rows the boot check finds missing. A file another account shows, or one whose other accounts can’t be read, stays where it is. Returns the events touched.
- settle
- Delete every original owed, against what the other accounts on this device show now. At boot and before a move.
- settle_
batch - Delete the originals a move just owed, against what it read of the other accounts.
- unclaimed
- Files in
dirthat no other account shows and nobody saved: what older versions and deleted chats left behind, plus this account’s own. Dotfiles are markers, never content.