Question

I see in the CLISP implementation notes the availability of #'read-char-sequence and #'read-byte-sequence. Hot stuff.

But is it possible to seek to a particular point in a file before doing the desired reading?

I've searched both Steele's Common Lisp the Language and the CLISP implementation notes, and not found an answer.

Était-ce utile?

La solution

You can use file-position.

(file-position my_stream)

This returns the current position in the file.

(file-position my_stream n)

This sets it to the nth position.

However there are sometimes problems with using this in Unix. Make sure you do not go beyond EOF.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top