ReferenceFilesystem

delfile

Deletes one workspace file. This does not remove a directory; use delfolder for that. A missing or inaccessible file can raise an error.

Syntax

delfile(path: string) -> ()

Also available as

deletefiledel_file

Parameters

ParameterTypeDescription
pathstringWorkspace-relative file to remove.

Description

File operations are confined to the current workspace. Absolute paths and traversal outside it are not accepted. Use a file dialog when the user needs to choose an external file.

Example

writefile("temporary.txt", "temporary")
delfile("temporary.txt")

These are Game executor contracts. Check build requirements and session lifetimes before using them.