pub fn send(
memory: &Path,
folder: &Path,
own: &str,
login: &Login,
sealed: &BTreeMap<String, u64>,
now: i64,
again: bool,
frugal: bool,
) -> PulledExpand description
This device’s own files sent to the server beside the sync app that
carries the folder (docs/database.md, “Sent to the server too”), once the
backup found the folder there under the same seal. Only its own files
(own_plain, and the sealed files it made, sealed: their name and the
size it sealed, sent whole only), each over what is there as it was seen;
a file found there as it is here is not sent again (the sync app sent it,
or will find it there as its own); records only grow (never one shorter
than what went, or than the server’s), and go in order; never another
device’s file. Each file is given the time its size asks (FLOOR); one
that does not go is held back (backoff), never tried sooner, the next
records with it, the other files still going. The server unreachable,
nothing is tried before its backoff. With frugal (a metered connection),
or the connection measured slow, a large file goes at most every ten
minutes. With again, or every six hours, or the first time, the server’s
folders are listed and every file compared: one lost there is sent again.
This device’s records past their time and the sealed files it swept are
taken out there. One send at a time on this device, whichever process runs it.