2,732
edits
Red Leader (talk | contribs) m (→Variables: typos) |
Red Leader (talk | contribs) (→Functions: Start stat()) |
||
Line 296: | Line 296: | ||
}} | }} | ||
=== stat( | === stat() === | ||
Calls | {{Nasal doc | ||
|syntax = io.stat(path); | |||
|text = Calls {{func link|stat()|ext=https://en.wikipedia.org/wiki/Stat_(system_call)}} and returns an array containing 12 pieces of data. See the table below. | |||
|param1 = path | |||
|param1text = Path to the file as a string. | |||
|example1 = var path = getprop("/sim/fg-root") ~ '/Nasal/geo.nas'; | |||
var stat = io.stat(path); | |||
printf("File size: %s bytes", stat[7]); # prints file size | |||
}} | |||
{| class="wikitable" | |||
! Data !! Meaning | |||
|} | |||
=== tell(filehandle) === | === tell(filehandle) === |