refator jar-file fkt out
This commit is contained in:
parent
127fd9cbfe
commit
4959cb9d95
1 changed files with 10 additions and 6 deletions
|
@ -177,6 +177,15 @@
|
|||
(not (= element norm-path-to-filter-for))))
|
||||
elements-list))))
|
||||
|
||||
(defn jar-file-for-resource
|
||||
[resource]
|
||||
(JarFile.
|
||||
(.toFile
|
||||
(Paths/get
|
||||
(URI.
|
||||
(.getSchemeSpecificPart
|
||||
(filesystem-uri (:java-uri resource))))))))
|
||||
|
||||
(s/defn
|
||||
list-entries-for-dir ;:- [VirtualPath]
|
||||
[resource :- Resource]
|
||||
|
@ -186,12 +195,7 @@
|
|||
(map #(.getName ^JarEntry %)
|
||||
(enumeration-seq
|
||||
(.entries
|
||||
(JarFile.
|
||||
(.toFile
|
||||
(Paths/get
|
||||
(URI.
|
||||
(.getSchemeSpecificPart
|
||||
(filesystem-uri (:java-uri resource)))))))))))
|
||||
(jar-file-for-resource resource)))))
|
||||
(.list (.toFile (:java-path resource)))))
|
||||
|
||||
(defn get-resources-recursive ;:- [Resource]
|
||||
|
|
Loading…
Reference in a new issue