Commit ec87ecc0 authored by Philipp Marek's avatar Philipp Marek
Browse files

Merge branch '25-string-element-types-should-perhaps-be-smarter' into 'master'

Be smarter about element types

Closes #25

See merge request alexandria/alexandria!23
parents a67c3a6c 13b1575b
......@@ -68,7 +68,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)
......@@ -80,7 +82,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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment