Qu

remove_file

Builtin index · File I/O

remove_file(path, [permanent=false])

Input: path, permanent · Output: no output

What it is

Deletes path (a Str) to the OS Recycle Bin/Trash by default, so it can be recovered; permanent=true deletes it outright (*default changed in v0.4.5*; the older recycle_bin=false still means permanent). Errors if it does not exist or is not a regular file, rather than silently doing nothing; on a system or volume with no trash it is an error naming permanent=true, never a silent permanent delete. With file history on, a permanent delete keeps a version first.

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
remove_file(path, [permanent=false])
path StrDeletes path (a Str) to the OS Recycle Bin/Trash by default, so it can be recovered.
permanent optional (default false)permanent=true deletes it outright (*default changed in v0.4.5*.
no output—

Examples

No documentation example calls this form yet. The File I/O chapter is where one belongs.