Skip to main content

Module folder

Module folder 

Source
Expand description

The served folder and what is in it: the boundary every path and URL is judged against, its document files by kind, its .gitignore rules, the entry document devpage was started with, which document owns a page or a widgets folder, and what a change to its files means — for open pages and for the folders to watch. Documents are loaded per call: the folder keeps the document index and the entry, and no other Document.

Structs§

Changed
What a burst of changed files means, once the folder has heard of them.
Folder
A served folder opened on its entry document.
Owner
The document that owns a page: the nearest site whose folder holds it, as its file reads now — or why it can’t be read.
ServedFolder
The canonical folder devpage serves from, the boundary around it, and the prefix its addresses are under — its mount: empty for a local devpage and bundled mode, /d/<id> or /d/<id>/v/<n> for a version in server mode. It is made once, where devpage starts serving a folder, and passed to everything loaded from it, so the mount reaches every address.
WatchSet
The folders to watch: deep ones recursively, shallow ones for their entries and the files directly in them.

Functions§

slashed
A path inside the folder as addresses name it: its parts joined with / on every platform, Windows too.