Skip to content
Snippets Groups Projects
Commit 13b1575b authored by Tim Bradshaw's avatar Tim Bradshaw
Browse files

Be smarter about element types

parent 49e82add
No related branches found
No related tags found
No related merge requests found
......@@ -67,7 +67,9 @@ which is only sent to WITH-OPEN-FILE when it's not NIL."
The EXTERNAL-FORMAT parameter will be passed directly to WITH-OPEN-FILE
unless it's NIL, which means the system default."
(with-input-from-file
(file-stream pathname :external-format external-format)
(file-stream pathname
:external-format external-format
:element-type ':default)
(read-stream-content-into-string file-stream :buffer-size buffer-size)))
(defun write-string-into-file (string pathname &key (if-exists :error)
......@@ -79,7 +81,8 @@ The EXTERNAL-FORMAT parameter will be passed directly to WITH-OPEN-FILE
unless it's NIL, which means the system default."
(with-output-to-file (file-stream pathname :if-exists if-exists
:if-does-not-exist if-does-not-exist
:external-format external-format)
:external-format external-format
:element-type ':default)
(write-sequence string file-stream)))
(defun read-stream-content-into-byte-vector (stream &key ((%length length))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment