Skip to content

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

FieldTypeRequiredNotes
pathstringyesWorkspace-relative path to remove.

Output

What was removed:

{ "path": "notes/todo.md", "removed": true }

From JavaScript

await nocturn.fs.remove("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.