Delete a document or subfolder
ragdown_deletePermanently delete a document or subfolder from the RAGDown documents folder and index, with no trash or undo. Use recursive to remove a non-empty subfolder.
Instructions
Permanently delete a document, or a subfolder, from the documents folder and the index. There is no trash and no undo. Call ragdown_backlinks first: links to a deleted document are left as they are, pointing at nothing. When a document is out of date rather than unwanted, prefer ragdown_remember with supersedes, which keeps the old text readable. A subfolder that holds anything is deleted only with recursive: true. Pass base_hash to delete a document only if it is still the version you read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path of the document or subfolder relative to the documents root, e.g. 'ops/pg.md' or 'ops' | |
| base_hash | No | For a document: the hash ragdown_read_doc returned. If the file changed since, nothing is deleted | |
| recursive | No | For a subfolder: also delete everything in it — documents, attachments and any other files |