Utility functions for handling I/O.
Utility functions for handling I/O.
(close! stream)
Ensure a stream is closed, swallowing any exceptions.
Ensure a stream is closed, swallowing any exceptions.
(last-modified-date file)
Returns the last modified date for a file, rounded down to the nearest second.
Returns the last modified date for a file, rounded down to the nearest second.
(piped-input-stream func)
Create an input stream from a function that takes an output stream as its argument. The function will be executed in a separate thread. The stream will be automatically closed after the function finishes.
For example:
(piped-input-stream (fn [ostream] (spit ostream "Hello")))
Create an input stream from a function that takes an output stream as its argument. The function will be executed in a separate thread. The stream will be automatically closed after the function finishes. For example: (piped-input-stream (fn [ostream] (spit ostream "Hello")))
(string-input-stream s)
(string-input-stream s encoding)
Returns a ByteArrayInputStream for the given String.
Returns a ByteArrayInputStream for the given String.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close