Checks the existence of file or directory. If not exist, return nil. If exist, return the object information.
@status current Introduced in 2.5.0
Parameters
path (string) path to the object
path
Return value
table object info, table elements:
table
size (number) file size
size
attrib (number) file attribute flags
attrib
time (table) table with last time modified date and times, table elements:
time
year (number) year
year
mon (number) month
mon
day (number) day of month
day
hour (number) hours
hour
hour12 (number) hours in US format
hour12
min (number) minutes
min
sec (number) seconds
sec
suffix (text) am or pm
suffix
Last updated 4 years ago
Was this helpful?
info = fstat("radio") if info ~= nil then if (info.attrib == AM_DIR) then print("is a directory") end size = info.size time = info.time end