BasicFile

fops.spad line 255 [edit on github]

This is domain for storing and reading Spad values in files.

close!: % -> Void

close!(f) closes the file f.

flush: % -> Void

flush passes all buffered data to the operating system.

open: (FileName, String) -> %

open(n, m) opens the file.

openIfCan: (FileName, String) -> Union(%, failed)

openIfCan(n, m) opens the file. If file can not be open it returns “failed”.

read: % -> None

read sequentially reads one item from the file.

readIfCan: % -> Union(None, failed)

readIfCan reads one item from the file, otherwise returns "failed"

write!: (%, None) -> Void

write! writes one item to the file.