cast path to file + fs-prefix default
This commit is contained in:
parent
2a3db17002
commit
ba678e848f
3 changed files with 4 additions and 5 deletions
|
@ -466,7 +466,7 @@
|
||||||
new-io/get-resource
|
new-io/get-resource
|
||||||
slurp
|
slurp
|
||||||
read-string
|
read-string
|
||||||
(update-in [:fs-prefix] (fnil str ""))
|
(update-in [:fs-prefix] (fnil str "content"))
|
||||||
(update-in [:blog-prefix] (fnil str ""))
|
(update-in [:blog-prefix] (fnil str ""))
|
||||||
(update-in [:page-root] (fnil str ""))
|
(update-in [:page-root] (fnil str ""))
|
||||||
(update-in [:post-root] (fnil str ""))
|
(update-in [:post-root] (fnil str ""))
|
||||||
|
|
|
@ -71,12 +71,11 @@ if no, return empty vector."
|
||||||
(let [assets (cp-io/get-resources fs-prefix base-path paths)
|
(let [assets (cp-io/get-resources fs-prefix base-path paths)
|
||||||
filter-file (fn [xs] (filter #(= (:resource-type %) :file) xs))
|
filter-file (fn [xs] (filter #(= (:resource-type %) :file) xs))
|
||||||
filter-ext (fn [xs] (filter #(= (cp-io/get-file-extension-from-resource %) ext) 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-file (fn [map-entry] (.toFile (:java-path map-entry)))]
|
||||||
get-java-path (fn [map-entry] (cast-file (:java-path map-entry)))]
|
|
||||||
(->> assets
|
(->> assets
|
||||||
filter-file
|
filter-file
|
||||||
filter-ext
|
filter-ext
|
||||||
(map get-java-path))))
|
(map get-java-file))))
|
||||||
|
|
||||||
;
|
;
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in a new issue