| Did you know ... | Search Documentation: |
| file->open |
append is like write,
but does not truncate the file to zero characters.
If a filter is specified, file->open
will not open the file itself, but read or write the file through the
filter. The argument is the Unix command string. Example:
?- new(F, file('data.Z')),
send(F, open, read, uncompress).
This example opens the file data.Z using
the Unix command
`uncompress < data.Z`
and reads the output of this command.
When extension is specified, file->open
appends the extension to file<-name
before passing the name to Unix. This implies the file above could also
have been opened using:
?- new(F, file(data)), send(F, open, read, uncompress, '.Z').
Class process provides another way to interact with Unix processes.
-filter ->close ->access