             [parkour (conf :as conf) (reducers :as pr)]
             [parkour.util :refer [ignore-errors returning map-vals mpartial]])
   (:import [java.net URI URL]
-           [java.io File IOException InputStream]
+           [java.io File IOException InputStream Writer]
            [org.apache.hadoop.fs FileStatus FileSystem Path]
            [org.apache.hadoop.filecache DistributedCache]))
 

  ([x y] (Path. (-path x) (str y)))
  ([x y & more] (apply path (path x y) more)))

(defmethod print-method Path
  ([^Path x ^java.io.Writer w]
     (.write w "#hadoop.fs/path \"")
     (.write w (str x))
     (.write w "\"")))

(defn path?
  "True iff `x` is a Path."

       (-> x (.resolve (str (.getPath x) "/")) (.resolve (str y)))))
  ([x y & more] (apply uri (uri x y) more)))

(defmethod print-method URI [x w] (write-all w "#java.net/uri \"" x "\""))
(defmethod print-dup URI [x w] (write-all w "#java.net/uri \"" x "\""))

(defn uri?
  "True iff `x` is a URI."
