Expand description
kernoid-sync: a folder kept in step with a file store of kernoid (RFC 0005) – the logic every one of kernoid’s apps shares, whatever shows the files (a folder, the system’s file manager through a native shell).
One round (Folder::sync): the store’s changes since the state last read (FileNode/changes; the whole store
when there is no state or it is too old), the folder scanned (size and modification time tell a change), both
compared with what they were when they last agreed (plan), and the actions carried out. A change on both sides
keeps both: the server’s version takes the name, the local one becomes a copy beside it. The local state is a
SQLite database outside the folder (state).
OPEN: moves as moves (today a deletion and a creation), transfers resumed after an interruption (RFC 9404), content hashes to tell a change that keeps size and time, vaults (RFC 0006, 6: their names are encrypted), the file systems’ own name rules (Windows).
Modules§
- plan
- What to do to bring a folder and a store into step – decided from three views of every path: as both sides were when they last agreed (the base), as the store is now, as the folder is now. Pure: no I/O, so every case is tested.
- state
- The local state of a folder kept in step, in SQLite: the store’s tree as last read with the journal state it
belongs to, and per path what both sides were when they last agreed (
plan::Base). One database per folder; it lives outside the folder, where the app keeps its data.
Structs§
- Folder
- A folder kept in step with one store (an account’s own files, a drive, or files shared with the user).
- Report
- What a round did.
Enums§
Functions§
- conflict_
copy report (conflict 2026-10-30 1412).txtbesidereport.txt– a name not taken yet.- scan
- The files and directories of a folder by path; links, unfinished downloads and other kinds are left out.
- tree
- The store’s nodes by path – without the trash and what is in it, and without names a folder cannot hold (they
go to
skipped, with what is below them).