C&C Docs
Log in
Platform services

A file explorer: cnc-file-tree and cnc-file-browser in a dock

Two widgets over your own drive, each in a fixed cnc-dock group. The tree walks the whole drive in one $file.tree call; the browser lists one folder of it. Neither widget writes: each reports what you asked for — a rename, a move, a drop onto a folder, an upload — and this page does the write as you, then hands both widgets the drive as it now is. The handlers are in file-explorer.mjs, one per event.

A drive is always somebody's. Log in or create an account to build one to explore.

One state, two panels

The dock's layout names the file-tree and file-browser templates as panel types, so both panels are part of this page and bind to its state: no child block is loaded and no message passes between them. After every write the page re-reads the drive — $file.tree('/', { depth: 10 }) for the tree, a query on _FsNode for the folder — and both widgets redraw from that. A picture's preview is the URL minted where its node was read, so only someone who may read the node gets one; the widget only reads it off the item.