File

← Reference
Io
Encapsulates file i/o. Here's an example of opening a file, and reversing its lines:
file := File clone openForUpdating("/tmp/test")
lines := file readLines reverse
file rewind
lines foreach(line, file write(line, "\n"))
file close