BasicKeyedAccessFile
fops.spad line 324 [edit on github]
This domain implements access to keyed access files (KAF-s).
- close!: % -> Void
close! closes the keyed access file.
- keys: % -> List String
keys(f) gives the list of keys of f.
- open: (FileName, String) -> %
open opens the keyed access file.
- openIfCan: (FileName, String) -> Union(%, failed)
openIfCan(n, m) opens the keyed access file. If file can not be opened returns “failed”.
- read: (%, String) -> None
read(f, key) reads item with the key key from f.
- read: (%, String, None) -> None
read(f, key, val) reads item with the key key from f. If key is not present, val is returned.
- remove!: (%, String) -> Void
remove!(f, key) removes item with the key key from f.
- write!: (%, String, None) -> Void
write! writes one item to the keyed access file.