file_remove
Gate: gated
on file, target the workspace-relative path being removed
ยท write
Delete something. Gated on the path, like every file write โ and the one where saying no matters most, because there is no undo. Only empty directories are removed; a recursive wipe is not a tool. See the file kind.
Input
| Field | Type | Required | Notes |
|---|---|---|---|
path | string | yes | Workspace-relative path to remove. |
Output
What was removed:
{ "path": "notes/todo.md", "removed": true }From JavaScript
await nocturn.fs.remove("notes/todo.md");nocturn.call("file_remove", { path: "notes/todo.md" });Notes
require("fs").rmSync(path, { recursive: true }) deliberately throws โ recursive removal is not available in any form, not even through the compat shim.