cast path to file + fs-prefix default

This commit is contained in:
lukas 2020-02-26 08:49:46 +01:00
parent 2a3db17002
commit ba678e848f
3 changed files with 4 additions and 5 deletions

View file

@ -466,7 +466,7 @@
new-io/get-resource
slurp
read-string
(update-in [:fs-prefix] (fnil str ""))
(update-in [:fs-prefix] (fnil str "content"))
(update-in [:blog-prefix] (fnil str ""))
(update-in [:page-root] (fnil str ""))
(update-in [:post-root] (fnil str ""))

View file

@ -71,12 +71,11 @@ if no, return empty vector."
(let [assets (cp-io/get-resources fs-prefix base-path paths)
filter-file (fn [xs] (filter #(= (:resource-type %) :file) xs))
filter-ext (fn [xs] (filter #(= (cp-io/get-file-extension-from-resource %) ext) xs))
cast-file (fn [java-path] (io/as-file (.toString java-path)))
get-java-path (fn [map-entry] (cast-file (:java-path map-entry)))]
get-java-file (fn [map-entry] (.toFile (:java-path map-entry)))]
(->> assets
filter-file
filter-ext
(map get-java-path))))
(map get-java-file))))
;
;