Changes

Jump to navigation Jump to search
77 bytes added ,  12:46, 26 October 2016
→‎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 as per die().
+
|text = Reads and returns a complete file as a string. Failures are thrown as runtime errors.
 
|param1 = file
 
|param1 = file
|param1text = Path to the XML file as a string.
+
|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);
 
}}
 
}}
  

Navigation menu