-
Notifications
You must be signed in to change notification settings - Fork 2
file.open
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Open a file; returns a FileHandle, or null on failure
| Parameter | Default Value | Note |
|---|---|---|
| path | ||
| mode | "r+" |
| Condition | Return Value |
|---|---|
| (always) | number |
import "file"
fh = file.open("data.txt", "r")
if fh == null then
print "failed to open file"
else
while not fh.atEnd
print fh.readLine
end while
fh.close
end if