FileCategory(Name, S)¶
files.spad line 1 [edit on github]
Name: SetCategory
S: SetCategory
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!: % -> %
close!(f)returns the filefclosed to input and output.
- coerce: % -> OutputForm
from CoercibleTo OutputForm
- flush: % -> Void
flush(f)make sure that buffered data in written out to the operating system.
- iomode: % -> String
iomode(f)returns the status of the filef. The input/output status offmay be “input”, “output” or “closed” mode.
- latex: % -> String
from SetCategory
- name: % -> Name
name(f)returns the external name of the filef.
- open: (Name, String) -> %
open(s, mode)returns a filesopen for operation in the indicated mode: “input” or “output”.
- open: Name -> %
open(s)returns the filesopen for input.
- read!: % -> S
read!(f)extracts a value from filef. The state offis modified so a subsequent call to read! will return the next element.
- reopen!: (%, String) -> %
reopen!(f, mode)returns a filefreopened for operation in the indicated mode: “input” or “output”.reopen!(f,"input")will reopen the fileffor input.
- write!: (%, S) -> S
write!(f, s)puts the valuesinto the filef. The state offis modified so subsequents call towrite!will append one after another.