files.spad line 1 [edit on github]
This category provides an interface to operate on files in the computer's
file system. The precise method of naming files is determined by the Name parameter. The type of the contents of the file is determined by S
.
close!(f)
returns the file f
closed to input and output.
flush(f)
make sure that buffered data in written out to the operating system.
iomode(f)
returns the status of the file f
. The input/output status of f
may be "input", "output" or "closed" mode.
name(f)
returns the external name of the file f
.
open(s)
returns the file s
open for input.
open(s, mode)
returns a file s
open for operation in the indicated mode: "input" or "output".
read!(f)
extracts a value from file f
. The state of f
is modified so a subsequent call to read! will return the next element.
reopen!(f, mode)
returns a file f
reopened for operation in the indicated mode: "input" or "output". reopen!(f,"input")
will reopen the file f
for input.
write!(f, s)
puts the value s
into the file f
. The state of f
is modified so subsequents call to write!
will append one after another.