"The moment your database can answer 'what files are in that folder?', you have built a second filesystem — and now you own both."
The Line That Must Not Be Crossed
Waygate has a SQLite database, and it stores real, durable things. So where's the danger? It's a single question: can the database answer "what files are in /some/folder right now?" If yes, you've built a shadow directory tree — a second copy of the filesystem's structure that will drift the instant anything changes outside your app. Waygate's database is designed so it cannot answer that question. Only the disk can.
What Waygate Durably Stores
Everything in the database is either a reference or evidence, never contents. Workspace: which locations are open and how the window is laid out. Favorites: bookmarks plus a display hint, with no promise the target still exists. Presets: reference sets and layout. Saved network locations: a sanitized scheme, host, and share name — no credentials, no file list. The operation journal: what the engine did. Notice that not one of these is "the list of files in a folder."
Why Sync Clients Teach This the Hard Way
Cloud sync clients are the cautionary tale. To sync, they must maintain a shadow tree — a local model of what's on the server and what's on disk — and reconcile them. That shadow tree is the source of their worst bugs: files that reappear after deletion, conflicts that duplicate, phantom entries that won't clear. Waygate isn't a sync client and deliberately never builds that shadow, which is exactly why it can't inherit that whole family of bugs.