summaryrefslogtreecommitdiff
path: root/docs/9web.service
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-17 00:48:48 -0300
committerGabriel Schneider <[email protected]>2026-11-17 10:06:26 -0300
commitb44d970c121a65e1f9de04fee600a3b495fb6c96 (patch)
treedf992c4dbbffb6f27f2e3cabf73dc634f4a58dc6 /docs/9web.service
parent67fa2a1f2e6057bbce7441a16ebab84848f623ae (diff)
downloadcloud9-b44d970c121a65e1f9de04fee600a3b495fb6c96.tar.gz
cloud9-b44d970c121a65e1f9de04fee600a3b495fb6c96.zip
verbs: the fs verbs as a function a program calls with a dialled tree
The user wants each app's binary to drive the tree it serves ("the cli should be like a living documentation, similar to 9p"): `pardes fs read pane/3/body`, `drat-meout fs read state/scene`. verbs.run(&fsys, args, stdin, stdout, stderr) is that command line, added in five lines (the top of the file shows them): ls, read, write (the words and a newline, or stdin a write a read of it, as 9p write), ask (write then read one open), follow (ask, or read: each answer flushed as it comes), stat (Plan 9's mode letters, length, uid, gid, mtime, name), help and complete. Exit status 0, or 1 with the server's own words on stderr; a verb not known is the usage. help PATH reads the tree's /README: a line is about the file its first word names, a path from the root with a leading or trailing slash or a comma dropped and <anything> standing for one name, and about everything under it; lines after it indented deeper go with it. pardes's src/fs-help.txt, 9proc's and 9agents' READMEs are in that shape already; sketchbook's control tree serves none yet and would write one so. complete PREFIX lists the directory PREFIX ends in, the names it starts, as paths, a trailing slash on a directory. Tests drive run() against TestTree in process: listings, reads, stats, completion, refusals in the server's words, stdin writes, ask, help including the line matcher on pardes's and 9proc's shapes, follow of three held chunks and a hangup mid-read, and the usage. Also run by hand from a scratch program of those five lines against a 9proc-demo on a Unix socket.
Diffstat (limited to 'docs/9web.service')
0 files changed, 0 insertions, 0 deletions