ReferenceFilesystem

item:IsFile

Reports whether the chosen item represents a file. Use this to decide whether Read, Write or Append is appropriate.

Syntax

item:IsFile() -> boolean

Returns

TypeDescription
booleanWhether this is a file item.

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
    print(item:IsFile())
end

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