file_list
Gate: ungated
· belongs to file
· read
List what a workspace directory contains. Ungated, like the other file reads — see the file kind for why, and for what confinement guarantees instead.
Input
| Field | Type | Required | Notes |
|---|---|---|---|
path | string | no | Workspace-relative directory. Omit or pass "" for the workspace root. |
Output
A JSON array, one object per entry:
[ { "name": "todo.md", "isDir": false, "size": 214 }, { "name": "2026", "isDir": true, "size": 0 } ]From JavaScript
const entries = await nocturn.fs.list("notes");for (const e of entries) console.log(e.name, e.isDir);const entries = JSON.parse(nocturn.call("file_list", { path: "notes" }));