Repository navigation
API turboframe.recent
Source: turboframe/recent.py. Generated from the code of TurboFrame 0.3.0 by tools/wiki_api.py.
The folders and files opened lately, newest first, in the application's store.
Recent(store) keeps, under the store's "recent", a list of paths per kind ({"folders": [...], "files": [...]}): add puts a path first (once, resolved), forget takes it out, entries reads those still on disk. Only real paths are kept; one that no longer exists is left out when the list is read. The store is any object with load() -> dict and save(dict) (turboframe.config.JsonStore).
('folders', 'files')
12
class Recent
Recent(store: Any, key: str = 'recent', *, limit: int = 12, kinds: tuple[str, ...] = ('folders', 'files'))The recent paths of kinds in store[key], at most limit of each.
-
stored() -> dict[str, list[str]]: Every kind's list as kept, without what is not a path's text. -
entries(kind: str) -> list[Path]: Thekind("folders","files") still on disk, newest first. -
add(kind: str, path: Path) -> None:pathfirst in its list (and only once), resolved. -
forget(kind: str, path: Path) -> None:pathout of its list (as it is listed:entriesgives it).
TurboFrame · part of Divengine · GPL-3.0-or-later · report an issue
Tutorial
Examples
The desktop
- The Desktop
- Application Mixins
- Windows and Lists
- Dialogs
- Histories
- Progress
- Themes and Colors
- Glyphs
- Settings and Recent Files
- Command Palette
Editing
Tasks
Languages
Running
Reference
Links