 (declare mk-path)
 
 (defn resolve-tilde-path
-  [path]
-  (cond
-   (= "~" path)
-   (home-dir)
-
-   (.startsWith path (str "~" (file-separator)))
-   (mk-path [(home-dir) (chop-first-n 2 path)])
-
-   :default
-   path))
+  "Resolves path names starting with ~ to point to home directory. If path is a
+  java.io.File object, returns it unchanged."
+  [path]
+  (if (file? path)
+    path
+    (cond
+     (= "~" path)
+     (home-dir)
+
+     (.startsWith path (str "~" (file-separator)))
+     (mk-path (home-dir) (chop-first-n 2 path))
+
+     :default
+     path)))
 
 (defn mk-path
   "Takes a seq of strings and returns a string which is a concatanation of all
   the input strings separated by the system's default file separator."
-  [parts]
+  [& parts]
   (let [path (apply str (interpose (file-separator) parts))]
     (resolve-tilde-path path)))
 

    (.setReadTimeout con timeout)
    (with-open [in (.getInputStream con)
                out (io/output-stream target-path)]
      (io/copy in out))))

(defn download-file
  "Downloads the file pointed to by URI to local path target-path. If no timeout

    ^{:doc "Useful file manipulation fns"
      :author "Sam Aaron"}
  overtone.helpers.file
  (:import [java.net URL]
           [java.io StringWriter File])
  (:use [clojure.java.io]
        [overtone.helpers.string])
  (:require [org.satta.glob :as satta-glob]
            [clojure.java.io :as io]))

(defn file?
  "Returns true if f is of type java.io.File"
  [f]
  (= java.io.File (type f)))

(defn- files->abs-paths
  "Given a seq of java.io.File objects, returns a seq of absolute paths for each
