NextPrevUpTopContentsIndex

close

Generic Function
Summary

The close function is implemented as a generic function.

Package

common-lisp

Signature

close stream &key abort => result

Arguments

stream

A stream.

abort

A generalized boolean.

Values

result

A boolean.

Description

The standard function close is implemented as a generic function. All external resources used by the stream should be freed and true returned when that has been done. The result value for close is as per the Common Lisp ANSI specification.

When stream is an instance of a subclass of buffered-stream, if abort is true then any remaining data in the buffer can be discarded. There are two built-in methods on buffered-stream. The primary method specialized on buffered-stream returns t . The other, an :around method specialized on buffered-stream, flushes the stream buffer if abort is nil , calls the next method and marks the stream as closed if that method returns true. Thus the only requirement for a primary method specialized on a subclass of buffered-stream is that it must close any underlying data source and return true.

The close method on the fundamental-stream class sets a flag for open-stream-p

See also

buffered-stream
fundamental-stream
open-stream-p


LispWorks Reference Manual - 12 Mar 2008

NextPrevUpTopContentsIndex