A generic function that determines if an object is an input stream.
common-lisp
input-stream-p stream => result
stream⇩ |
A stream. |
result |
A generalized boolean. |
The generic function input-stream-p
implements the standard function. There are methods with stream specialized on fundamental-stream, fundamental-input-stream and fundamental-output-stream that returns t
if stream is an input stream. If you want to implement a stream class with no inherent directionality (and thus does not inherit from fundamental-input-stream or fundamental-output-stream) but for which the directionality depends on the instance, then you should add specialized method for input-stream-p
.
There is an example in 24.2.3 Stream directionality.
input-stream-p in the Common Lisp HyperSpec
fundamental-input-stream
output-stream-p
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:30