183
edits
m (→io.readfile()) |
No edit summary |
||
Line 3: | Line 3: | ||
== Nasal Core functions == | == Nasal Core functions == | ||
=== io.open(filename, mode="r") === | === io.open(filename, mode="r") === | ||
Opens the file with the specified mode (as per ANSI fopen()) and returns a ghost object representing the filehandle. Failures are thrown as runtime errors as per die(). | Opens the file with the specified mode (as per ANSI fopen()) and returns a ghost object representing the filehandle. Failures are thrown as runtime errors as per die(). The function io.open is wrapped in Nasal/io.nas, which uses a permission system in addition to the operating system permission system. This is defined in Nasal/IOrules. So if the error "unauthorized access" occurs, one of the Nasal IO rules might be violated. | ||
=== io.close(filehandle) === | === io.close(filehandle) === | ||
Closes the specified file as per ANSI fclose(). | Closes the specified file as per ANSI fclose(). |
edits