# deleteFile

Remove a file or directory.

```js
deleteFile(path)
```

## Arguments

| Argument | Type | Meaning |
| --- | --- | --- |
| `path` | string | Target path. |

## Returns

null on success; error string on failure.

## Example

```js
const error = deleteFile(__dirname + "/temporary.txt");
if (error !== null) throw new Error(error);
```

## Notes

Deletion is not undoable; only remove files the task owns.

[All JavaScript APIs](https://mcp.applesauceos.com/doc/api.md) · [Automation playbook](https://mcp.applesauceos.com/doc/ai.md)
