composeui.core.autosave

Autosave: a desktop app’s unsaved work, saved to a folder of its own and opened after a crash.

On Qt and Textual, for a main view with MainView.autosave. Each running app holds a folder of its own, locked while it runs, in the app’s folder of the user’s data directory. Every MainView.autosave_interval seconds while the study has unsaved changes, the app saves a snapshot there: the views’ state and the model’s data of the same moment, named by a record swapped in last. A clean close deletes the folder. So a folder whose lock is free was left by an app that ended without one, e.g. a crash: the next start opens its work.