Wrapper for tech io subsystem designed to be drop in replacement for some use cases of clojure.java.io.
Wrapper for tech io subsystem designed to be drop in replacement for some use cases of clojure.java.io.
(delete! url & options)
Delete a resource. Works currently with file or s3.
Delete a resource. Works currently with file or s3.
(exists? url & options)
Boolean existence check. Works with everything as fallback is to open an input stream and then close it.
Boolean existence check. Works with everything as fallback is to open an input stream and then close it.
(get-edn url & options)
Get edn data from a url
Get edn data from a url
(get-nippy url & options)
Get nippy data from a url
Get nippy data from a url
(get-object url & options)
Get object always returns something convertible to an input-stream. It may return a file for instance.
Get object always returns something convertible to an input-stream. It may return a file for instance.
(input-stream url & options)
thing->input-stream conversion. Falls back to clojure.java.io if url is not a string url
thing->input-stream conversion. Falls back to clojure.java.io if url is not a string url
(interlocked-copy-to-file src dest & args)
Copy first to a temp, then do an atomic move to the destination. This avoids issues with partial files showing up where they shouldn't and a failed io operation leading to incomplete results.
Copy first to a temp, then do an atomic move to the destination. This avoids issues with partial files showing up where they shouldn't and a failed io operation leading to incomplete results.
(ls url & {:keys [recursive?] :as options})
Return a directory listing. May be recursive if desired; only works with file or s3 providers.
Return a directory listing. May be recursive if desired; only works with file or s3 providers.
(metadata url & options)
If supported, returns at least :modify-date and :byte-length. Exception otherwise.
If supported, returns at least :modify-date and :byte-length. Exception otherwise.
(output-stream! url & options)
thing->output-stream conversion. Falls back to clojure.java.io if url is not a string url
thing->output-stream conversion. Falls back to clojure.java.io if url is not a string url
(put-edn! url data & options)
Put edn data to a url
Put edn data to a url
(put-image! image path-or-url & {:as options})
Will throw if an image with transparency is used to write a jpeg
Will throw if an image with transparency is used to write a jpeg
(put-nippy! url data & options)
Put nippy data to a url
Put nippy data to a url
(put-object! url value & options)
Put object. Object must be a byte-array, a file, or an input-stream. Strings will be interpreted as per the rules of clojure.java.io/input-stream. The most optimizations will apply to either files or byte arrays.
Put object. Object must be a byte-array, a file, or an input-stream. Strings will be interpreted as per the rules of clojure.java.io/input-stream. The most optimizations will apply to either files or byte arrays.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close