"mob next [ci-skip]"

This commit is contained in:
Jan Krebs 2019-12-06 15:15:40 +01:00
parent 0204170811
commit bbfc535c3b

View file

@ -30,18 +30,24 @@
(defn copy-dir (defn copy-dir
[source-path target-path ignored-files] [source-dir target-path ignore-patterns]
(let [source-list (.list source-dir)]
(doseq [f source-list]
(io/copy f (io/file target-path))))
) )
(defn copy-resources (defn copy-resources
[source-path target-path] [fs-prefix source-path target-path ignore-patterns]
(let [ignored-files [] (let [file (file-from-cp-or-filesystem fs-prefix source-path)
source-file (io/file source-path)] is-dir? (.isDirectory file)]
(cond (cond
(not (.exists (io/file source-path))) (nil? file)
(throw (IllegalArgumentException. (str "resource " source-path " not found"))) (throw (IllegalArgumentException. (str "resource " source-path " not found")))
(.isDirectory (io/file source-path)) is-dir?
(copy-dir source-path target-path ignored-files) (copy-dir file target-path ignore-patterns)
:else
nil
;(fs/copy src target)
))) )))
(defn copy-resources-from-theme (defn copy-resources-from-theme