The files plugin draws the list of files in the sidebar, olai’s left column. It is also where you make a file and where you delete one.1
What the list shows
The directory olai serves, in three sections:
| Section | Holds |
|---|---|
| Outlines | every file of a kind that holds rows, a row being one line of an outline2 |
| Reference | every other file olai knows the kind of, with a count beside the heading3 |
olai |
the _olai/ files — Pins, Settings, the Inbox — grouped under one entry4 |
Every line of the list shows where its file is, not only its name.5 When the sidebar is collapsed to its narrow rail, the list becomes two icons.6
Make a file
The + on the Outlines heading, named New outline or document, opens a menu of the kinds of file you can make.7
- Type a path without a suffix —
notes/plan, which is the box’s own suggestion. - Press
Enter. The kind’s suffix is added, so you getnotes/plan.olai, and the box closes.8
If the name already ends in another kind’s suffix, nothing is written.9 An empty directory shows a No outlines yet page, and its New outline button opens the same box.10
Delete a file
A file’s page has Delete… beside Edit, and asks you to confirm first.11
There is no undo for this. What The git plugin: commits, pushes and its two settings has already committed can be recovered from git; anything else cannot.
What the Reference section remembers
Opening the section is remembered. Collapsing it is not: olai forgets that you opened it rather than storing that it is shut.12 Opening a reference file shows the section and highlights that file, without storing anything.13
Files a plugin's own page draws
A file kind can say that its files are listed somewhere other than the sidebar, and one kind does. The two code files of a plugin your own directory defines are in neither list, because that plugin’s own page shows them (vault-plugins: running the plugins your directory defines). They are files of the directory all the same, recorded by git and listed by path in the commit panel, and the address of one opens that page at that file.
What other plugins contribute
| Location | Takes |
|---|---|
files.types |
a kind of file that can be made: its item in the + menu, and the path box it opens. Remove the last one and the heading has no + |
files.kinds |
a kind’s glyph, noun, article and test ids, keyed by the id of the plugin that claims it or by what it holds. The plugin’s id is preferred |
files.state carries the two controls this plugin draws for another plugin’s page: the path box, and the delete that asks first. Its open(kind) opens the path box for one kind and brings the sidebar into view: on a desktop the column comes out of its rail, and on a phone the drawer opens. A page that names files.state on a component of its own is whole without this plugin: no delete, no path box.
Switching files off removes the list and those two controls, and leaves an open editor and its file untouched.
Footnotes
-
The list is the Outlines tree, the Reference section under it, and the
olaigroup of olai’s own files. Outlines and Reference leave out folders that hold no files. How you move around the directory is in The sidebar, tabs and the palette. ↩ -
olai lists only files of a kind one of its plugins claims; which kinds those are is in vault: opening the directory olai serves. A claimed file whose plugin is switched off gets the plain file glyph and the name of the kind. ↩
-
The Reference section is absent when there are no such files, and collapsed until you open it. ↩
-
The
olaigroup is drawn only when_olai/holds a file. The Trash entry belongs to Trash and sits at the foot of the column rather than in that group. ↩ -
The row draws the file’s name, and the whole path is both the tooltip and the end of the name a screen reader reads out. A folder’s fold button keeps its own name,
Expand <folder>orCollapse <folder>, and carries the path on the folder glyph beside it. A file that could not be read wears a ⚠ whose sentence,This file couldn't be read, is drawn in the row as well as given as the tooltip. ↩ -
The two icons are
Outlines, namedOpen outlines, andDocuments, namedOpen the sidebar. ↩ -
The box says
Creating…while the write is in flight. It is a box for a name, and it tells a phone so: the return key says Done, and nothing is autocorrected, capitalised or spell-checked, sogarden.olaityped on a phone isgarden.olaion disk. ↩ -
The box names the kind the name belongs to, and suggests the name to type instead: at the outline door,
notes/plan.mdis a document, so the box offersnotes/plan, which makesnotes/plan.olai. A kind whose plugin is off saysCreating <kind> files is turned off.↩ -
With the
filesplugin off, the New outline button is not drawn. ↩ -
The question is
Delete notes/plan.olai? olai can't bring it back. Only what git has already saved can be recovered., with Delete file and Cancel. ↩ -
Clicking the heading folds the section even while the open file is the one that showed it, until you navigate or reload. ↩
-
Opening a reference file also opens the folders it sits in. So a reload with a reference file open shows it again, and a reload on an outline keeps the default collapse. Folder folds are a separate decision from the Reference one. ↩