Filesystem

delfile

Deletes a file from the executor workspace.

Syntax

delfile(path: string)

Arguments

NameTypeDescription
pathstringWorkspace-relative path to the file or folder.

Description

Deletes a file from the executor workspace.

Call it with 1 parameter(s): path. The argument table explains which values are required and which ones only refine the behavior.

It does not return data. Treat the call as an action and handle errors around the call site when needed.

Example

Delete a workspace file after confirming that it exists.

local path = "workspace/examples/temporary.txt"
writefile(path, "temporary")

if isfile(path) then
    delfile(path)
end