file_stat
Gate: ungated
· belongs to file
· read
Ask about a path without reading it. Ungated, like the other file reads — see the file kind.
Input
| Field | Type | Required | Notes |
|---|---|---|---|
path | string | yes | Workspace-relative path. |
Output
A JSON object; a missing path answers rather than erroring:
{ "exists": true, "isDir": false, "size": 214 }A path that is not there returns {"exists": false} — absence is an answer, not a failure.
From JavaScript
const s = await nocturn.fs.stat("notes/todo.md");if (s.exists && !s.isDir) console.log(s.size);const s = JSON.parse(nocturn.call("file_stat", { path: "notes/todo.md" }));