Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
alexandria
alexandria
Commits
13b1575b
Commit
13b1575b
authored
Oct 24, 2021
by
Tim Bradshaw
Browse files
Be smarter about element types
parent
49e82add
Changes
1
Hide whitespace changes
Inline
Side-by-side
alexandria-1/io.lisp
View file @
13b1575b
...
...
@@ -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
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment