2,732
edits
Red Leader (talk | contribs) (→Functions: Start readfile()) |
Red Leader (talk | contribs) (→readfile(): Finish doc) |
||
Line 232: | Line 232: | ||
{{Nasal doc | {{Nasal doc | ||
|syntax = io.readfile(file); | |syntax = io.readfile(file); | ||
|text = Reads and returns a complete file as a string. Failures are thrown as runtime errors | |text = Reads and returns a complete file as a string. Failures are thrown as runtime errors. | ||
|param1 = file | |param1 = file | ||
|param1text = Path to the | |param1text = Path to the file as a string. | ||
|example1 = | |example1 = var file = getprop("/sim/fg-root") ~ '/Nasal/math.nas'; | ||
file = io.readfile(file); | |||
print(file); | |||
}} | }} | ||