Expand description
The Studio’s files: the shipped examples, read-only and served from the site itself, over the reader’s own store (the browser’s OPFS, or IndexedDB in a private window).
Every shipped example is compiled into the site, so the Studio never copies one into the
reader’s store. /examples is a read-only layer answered from memory, and every other path is
the reader’s. Opening the Studio writes nothing, the examples’ part of the file tree exists
before any store answers (examples_tree), and a program still reads an example by its path.
Copies an earlier Studio wrote under /examples never show, and
StudioFiles::retire_old_copies removes them in the background.
Structs§
- Studio
Files - The Studio’s files: the shipped examples over the reader’s store.
Constants§
- EXAMPLES
- Where the shipped examples live.
Functions§
- example_
at - The shipped example at
path. - example_
text - The text of the shipped example at
path. - examples_
tree - The examples’ part of the file tree, in the file browser’s order: what the tree shows before the reader’s store has answered.
- load_
dir_ recursive - Load the folder at
pathfromvfsintoparent, every level in the file browser’s order. - open_
store - What the Studio asks of its files when it opens: the whole file tree (the examples from the
site, the reader’s own files from the store) and the text of
path, the file it opened with, orNonewhen there is no such file. It writes nothing.