Flushing the output buffer by hand before reading seems to work.
(with-open-file (stream "string.txt" :direction :io :if-exists :overwrite :if-does-not-exist :create) (write-string "abc" stream) (file-position stream 0) (write-char #\d stream) (finish-output stream) (read-char stream)) => #\b
Maybe the code for flushing the output buffer before reading in the case of a file stream opened in io mode is missing...
Flushing the output buffer by hand before reading seems to work.
(with-open-file (stream "string.txt"
:direction :io
:if- exists :overwrite
:if- does-not- exist :create)
(write-string "abc" stream)
(file-position stream 0)
(write-char #\d stream)
(finish-output stream)
(read-char stream))
=> #\b
Maybe the code for flushing the output buffer before reading in the case of a file stream opened in io mode is missing...