Expand description
fs.link_file_check: whether a file a message names is in its author’s folders, so a window can draw it as a link
or as a muted word (docs/specs/SPEC_LINKS_ON_EVERYTHING_2026_11_20.md §5, §6.4).
Built to be safe on text full of hostile paths:
- Read-only. It looks whether a file exists and reads nothing.
- Canonicalises before it compares. Symlinks,
.., junctions and short names are resolved first, and the result, not the written path, is compared with the author’s folder. - Rate-limited per author and overall, so text full of paths can’t be used to probe the disk.
- Says nothing about what is outside. A path outside the author’s folders answers
outsidewhether or not anything is there, and no answer names a host path.
A container agent’s paths are resolved by agent_media_files::resolve, as a click on them is. Any other agent’s
are resolved against the pane’s working directory.
Structs§
- Counts 🔒
- Asks counted in the current window, per author and overall.
Constants§
- FOLDER_
WORDS 🔒 - FOUND 🔒
- LIMITED 🔒
- LIMITED_
WORDS 🔒 - MAX_
HOPS 🔒 - How many links in a row are followed by hand.
- MISSING 🔒
- NOT_
FOUND_ 🔒WORDS - OUTSIDE 🔒
- OUTSIDE_
WORDS 🔒 - OVERALL 🔒
- PER_
AUTHOR 🔒 - WINDOW 🔒
Functions§
- answer 🔒
- check_
in_ 🔒container - A file named in a message of the container agent whose pane is
meta, found by the same rules a click on it uses. - check_
in_ 🔒folder - A file named in a message of a host agent whose pane works in
cwd: found when it is a file inside that folder. - collapse 🔒
pathwith.and..taken out, without touching the disk;Nonewhen a..would leave its root.- counts 🔒
- dangling_
link_ 🔒leaves - Whether
path, which is not there, would lead out of the folder (inside: the folder as written and as resolved) were it there: what a link on the way points at is followed whether it is there or not, so that a path through a link that leaves the folder answers as one that leaves it does, and what lies outside is not told by whether a file is there. - fs_
link_ 🔒file_ check fs.link_file_check.- leads_
to 🔒 - Where
pathwould lead if it were there: every link on the way followed (a dangling one too, by what it says), a..taken from where the link before it leads, and what is not there left as written.Nonewhen links go round.