Created
August 29, 2011 00:09
-
-
Save michaelbarton/1177434 to your computer and use it in GitHub Desktop.
Download binary files from a url
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(nsdownload | |
(:require [clojure.contrib.io :as io]) | |
(:import [java.io File])) | |
(defn download-binary [to from] | |
(with-open [in (io/input-stream (io/as-url from))] | |
(io/copy in (File. to)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment