CLASSPATH-4: Use io/as-file instead of treating URL as file path
Signed-off-by: Stuart Sierra <mail@stuartsierra.com>
Tim McCormack authored 11 years ago
Stuart Sierra committed 11 years ago
49 | 49 | "Returns a sequence of File paths from a classloader." |
50 | 50 | [loader] |
51 | 51 | (when (instance? java.net.URLClassLoader loader) |
52 | (map | |
53 | #(java.io.File. (.getPath ^java.net.URL %)) | |
54 | (.getURLs ^java.net.URLClassLoader loader)))) | |
52 | (map io/as-file (.getURLs ^java.net.URLClassLoader loader)))) | |
55 | 53 | |
56 | 54 | (defn classpath |
57 | 55 | "Returns a sequence of File objects of the elements on the classpath." |