next up previous contents index
Next: 6.1.4 Character I/O Up: 6.1 Input and Output Previous: 6.1.2.1 Other Predicates using   Contents   Index

6.1.3 DEC-IO Style File Handling

see(+F)

Makes file F the current input stream. Also note that different file names (that is, names which do not unify) represent different input streams (even if these different file names correspond to the same file).

Error Cases

permission_error(open,file,F)
File F is directory or file is not readable.
instantiation_error
F is not instantiated at the time of call.
existence_error(stream_or_path,F)
File F does not exist.
domain_error(stream_or_path,F)
F is not an atomic file identifier or stream identifier.

seeing(?F)

F is unified with the name of the current input stream. This is exactly the same with predicate current_input/1 described in Section 6.11, and it is only provided for upwards compatibility reasons.

seen

Closes the current input stream. Current input reverts to ``userin'' (the standard input stream).

tell(+F)

Makes file F the current output stream.

Also note that different file names (that is, names which do not unify) represent different output streams (even if these different file names correspond to the same file).

The implementation of the ISO predicate set_output/1, is essentially that of tell/1.

Error Cases

permission_error(write,file,F)
File F does not have write permission, or is a directory.
instantiation_error
F is uninstantiated.
domain_error(stream_or_path,F)
F is not an atomic file identifier

telling(?F)

F is unified with the name of the current output stream. This predicate is exactly the same with predicate current_output/1 described in Section 6.11, and it is only provided for upwards compatibility reasons.

told

Closes the current output stream. Current output stream reverts to ``userout'' (the standard output stream).

file_exists(+F)

Succeeds if file F exists. F must be instantiated to an atom at the time of the call, or an error message is displayed on the standard error stream and the predicate aborts.

Error Cases

instantiation_error
F is uninstantiated.


next up previous contents index
Next: 6.1.4 Character I/O Up: 6.1 Input and Output Previous: 6.1.2.1 Other Predicates using   Contents   Index
Terrance Swift 2007-10-05