feat(os): Directories.documents and the other five user folders #532
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/531-user-folders"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #531
Task: torbscript/language#531 (loop item, 2026-10-27):
Directories.documents(),downloads(),desktop(),pictures(),music(),videos()on every system.What
parseUserDirectoryforuser-dirs.dirs, read withFile.readTextofstd/fs(the file helper the issue names does not exist instd/os;Linux.readSystemFilereads /proc, /sys and os-release only, by design; std/fs does not import std/os, so no cycle). A missing, unreadable or disabled ($HOME/) entry answers the fallback below the home.~/Documents..~/Movies; the browser isUnsupported.Test:
torb check std/osclean locally; tests andtorb docs/skills/consistency run in CI (no torb binary in the loop's exec; if the skills check prints a diff it is applied in a follow-up commit).Not mergeable on
1d84edf: rebase onto main (da96426); no other blockers. Main gained the volumes slice, which touchesdocs/standard-library/os.md, its skill copy,std/os/tests/host.test.trbanddocs/design/OS.md, so these files conflict. Review of the diff itself found no blockers; CI is green on this head.1d84edf20e5b49bc61a3Approved at
5b49bc6(rebase of1d84edfonto mainaed0424; earlier "not mergeable" comment resolved, diff reviewed again in full).parseUserDirectoryhas 12 cases covering every list item of #531 (usual file, comments/blanks, absolute path, renamed folder,"$HOME/", relative, unterminated/unquoted,_EXTRAkey, last line wins); host test for all six; CI green on this head (tier A, bootstrap, gates, pdisc).$HOMEWORKis not expanded; Windows GUIDs and macOS~/Moviesmatch the spec.Non-blocking: the issue named an "existing file helper of std/os"; using
File.readTextofstd/fsinstead is explained in the PR body and is fine (no import cycle).