ApplesauceOS
Read Markdown ↗Download .md

deleteFile

Remove a file or directory.

js
deleteFile(path)

Arguments

ArgumentTypeMeaning
pathstringTarget 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 · Automation playbook