2,732
edits
Red Leader (talk | contribs) (→stat()) |
Red Leader (talk | contribs) (→Functions: Doc tell()) |
||
Line 335: | Line 335: | ||
=== tell(filehandle) === | === tell(filehandle) === | ||
Returns the current | {{Nasal doc | ||
|syntax = io.tell(file); | |||
|text = Returns the current pointer position of the file. | |||
|param1 = file | |||
|param1text = File object as returned by {{func link|open}}. | |||
|example1 = var path = getprop("/sim/fg-root") ~ '/Nasal/geo.nas'; | |||
var file = io.open(path); | |||
io.seek(file, 2, io.SEEK_SET); | |||
print(io.tell(file)); # prints "2" | |||
io.close(file); | |||
}} | |||
=== write(filehandle, str) === | === write(filehandle, str) === |