ToC | DocOverview | CGDoc | RelNotes | Index | PermutedIndex
| Allegro CL

| ANSI Common Lisp 21 Streams 21.2 Dictionary of Streams
21.2.26 file-length | Function
  Syntax: file-length stream length Arguments and Values: stream - a stream associated with a file. length - a non-negative integer or nil. Description: file-length returns the length of stream, or nil if the length cannot be determined. For a binary file, the length is measured in units of the element type of the stream. Examples:
       (with-open-file (s "decimal-digits.text"
                          :direction :output :if-exists :error)
         (princ "0123456789" s)
         (truename s))
       #P"A:>Joe>decimal-digits.text.1"
       (with-open-file (s "decimal-digits.text")
         (file-length s))
       10
Exceptional Situations: Should signal an error of type type-error if stream is not a stream associated with a file. See Also: open Allegro CL Implementation Details: See cl:file-length in implementation.htm for information on the implementation of file-length. Note the links are to the documentation for the current Allegro CL version. Replace /current/ in the URL with the Allegro CL version number to see similar documentation is earlier releases.

© Franz Inc. 1998-2019 - File last updated 02-07-2019