Type Function Library io.* Return value String Revision 2018.3303 Keywords io, type, file See also io.open()
obj is a valid file handle. Returns the string
obj is an open file handle,
"closed file" if
obj is a closed file handle, or
obj is not a file handle.
io.type( obj )
Object. Object to be tested.
local fh print( io.type( fh ) ) --> nil local path = system.pathForFile( "Icon.png", system.ResourceDirectory ) fh = io.open( path ) print( io.type( fh ) ) --> "file" io.close( fh ) print( io.type( fh ) ) --> "closed file"