Skip to content

fstat

fstat(path)

Checks the existence of file or directory. If not exist, return nil. If exist, return the object information.

Parameters

Name Req Type Description
path yes string path to the object

Returns

NameTypeDescription
-tableobject info, table elements:
FieldTypeDescription
sizenumberfile size
attribnumberfile attribute flags
timetabletable with last time modified date and times, table elements:
yearnumberyear
monnumbermonth
daynumberday of month
hournumberhours
hour12numberhours in US format
minnumberminutes
secnumberseconds
suffixtextam or pm

Availability

  • Since: 2.5.0
  • Radio support: all

Source

radio/src/lua/api_filesystem.cpp