I/O utility functions to complement clojure.java.io
I/O utility functions to complement clojure.java.io
(->Path x)
Construct a java.nio.file.Path from file-like x
Construct a java.nio.file.Path from file-like x
(copy src dest)
Copy file-like src to file-like dest and return dest. Asserts dest is
not a non-empty file (see clojure.java.io/copy
for unchecked copies)
Note: May theoretically race between dest-checking and copying
Copy file-like src to file-like dest and return dest. Asserts dest is not a non-empty file (see `clojure.java.io/copy` for unchecked copies) Note: May theoretically race between dest-checking and copying
(create-link link existing)
Create a hard-link for file-like link to file-like existing Returns link
Create a hard-link for file-like link to file-like existing Returns link
(data-input-stream istream-like)
Coerce argument to an open java.io.DataInputStream
Coerce argument to an open java.io.DataInputStream
(data-output-stream ostream-like)
Coerce argument to an open java.io.DataOutputStream
Coerce argument to an open java.io.DataOutputStream
(move src dest)
Atomically move file-like src to file-like dest and return dest. Throws error if dest already exists
Atomically move file-like src to file-like dest and return dest. Throws error if dest already exists
(move' src dest)
Atomically move file-like src to file-like dest and return dest.
Atomically move file-like src to file-like dest and return dest.
(nonempty-file? x)
Does file-like x exist and contain more than zero bytes?
Does file-like x exist and contain more than zero bytes?
(path-get part & parts)
Wrapper for java.nio.file.PathslPaths.get - converts a String or seq of Strings to a Path using the system file separator
Wrapper for java.nio.file.PathslPaths.get - converts a String or seq of Strings to a Path using the system file separator
(path-join part & parts)
Join Strings into a String path using the system file separator
Join Strings into a String path using the system file separator
(spit f content & options)
Like clojure.core/spit, but returns f
Like clojure.core/spit, but returns f
(stream-copy input-stream output-stream)
(stream-copy bufsize input-stream output-stream)
Copy from input stream to output stream. Does not close streams
Copy from input stream to output stream. Does *not* close streams
Buffer size to use for copying between streams, in bytes See IOUtils.copyLarge https://commons.apache.org/proper/commons-io/javadocs/api-2.4/index.html
Buffer size to use for copying between streams, in bytes See IOUtils.copyLarge https://commons.apache.org/proper/commons-io/javadocs/api-2.4/index.html
(temp-path)
Generate a random filename in the system temp directory Does not create a file, only generates a path
Generate a random filename in the system temp directory Does *not* create a file, only generates a path
(tempfile)
(tempfile filename)
(tempfile filename suffix)
Create a tempfile that deletes on VM exit
Create a tempfile that deletes on VM exit
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close