ReferenceFilesystem

item:Delete

Deletes the selected item. File deletion and directory removal are subject to filesystem permissions; do not assume a nonempty folder can be removed.

Syntax

item:Delete() -> ()

Description

Call this method on an item returned by a file dialog. Items belong to the current session and should not be serialized for reuse after reconnecting.

Example

local item = openfiledialog()
if item then
    item:Delete()
end

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