Skip to content

clojure.java.io/copy

View this page on ClojureDocs

Type: function Added: Clojure 1.2 Examples: 3 Runnable: 0
([input output & opts])

Copies input to output. Returns nil or throws IOException. Input may be an InputStream, Reader, File, byte[], char[], or String. Output may be an OutputStream, Writer, or File.

Options are key/value pairs and may be one of

:buffer-size  buffer size to use, default is 1024.
:encoding     encoding to use if converting between
              byte and char streams.

Does not close any streams except those it opens itself (on a File).

Examples

by devn on . May have evaluation errors.
by Hindol on . May have evaluation errors.
by wedesoft on . May have evaluation errors.

See also


Content from the matching ClojureDocs page, with authors credited on each contribution.