Skip to content

mfhellh/clj-transformer

Repository files navigation

clj-writing-macros

TODO

Useful commands

  • clojure -M:run/service
  • clojure -M:otel:run/service
  • clojure -X:test/run

Other stuff

(defn- download-file [url out-dir]
  (let [my-file (last (.split url "/"))
        out-path (str out-dir "/" my-file)]
    (if-not (.exists  (io/as-file out-path))
      (do
        (.mkdirs (java.io.File. out-dir))
        (future (with-open [in (io/input-stream url)
                            out (io/output-stream out-path)]
                  (io/copy in out)
                  (println  my-file " has been downloaded."))))
      (print my-file "is already there"))))

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published