7.2 Input/Output system extensions
open
exhibits the following behavior:(:direction :io)
option supports one file position and one buffer. Writing and reading a character advance the same pointer. Thus, you can write a character and move the pointer back to read the character you just wrote.:output
or:io
; you should only use multiple openings for:input
.open
always reads from the underlying file for input, but the output links for an existing file depend on the value of the:if-exists
option as follows::overwrite
, the existing file is used without changing the structure of any links. The file pointer is set to the beginning of the file. Output sent to the stream modifies the file.:append
, the existing file is used without changing the structure of any links. Output sent to the stream modifies the file. The file pointer is set to the end of the file.:supersede
, the specified file is replaced. When the file is opened, a temporary file is created and opened for output. When the stream is closed, the temporary file is renamed so that it replaces the specified file. Note that the symbolic link disappears when this happens.:new-version
, the implementation is the same as for:supersede
because UNIX does not support version numbers. This value is the default.nil
,open
fails; if a file of the specified name exists,nil
is returned.clear-input
and clear-output
depend on whether the stream to be cleared can be set to a specified position:file-position
, these functions cannot clear any input or output data.file-position
returnsnil
;clear-input
andclear-output
attempt to discard any unread input and buffered output respectively.open
can never be cleared, the standard input stream can always be cleared, and a stream returned by the functionmake-lisp-stream
can be cleared only when the value of its:positionable
keyword argument isnil
.
print-unreadable-object
, the functionreadtable-case
, and the variables*read-eval*
and*print-readably*
.Generated with Harlequin WebMaker