Skip to content

Instantly share code, notes, and snippets.

@michaelbarton
Created August 29, 2011 00:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelbarton/1177434 to your computer and use it in GitHub Desktop.
Save michaelbarton/1177434 to your computer and use it in GitHub Desktop.
Download binary files from a url
(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