Liking cljdoc? Tell your friends :D

cpath-clj

cpath-clj is a small library to transparently collect files on the classpath based on a given base directory. Since that directory might be located inside a JAR this is not always trivial.

Build Status endorse

Usage

Leiningen (via Clojars)

[cpath-clj "0.1.2"]

REPL

(require '[cpath-clj.core :as cp])

(cp/resources "static")
;; => {"/js/main.js" [#<URI file:/.../static/js/main.js>]
;;     "/js/lib.js"  [#<URI jar:file:/...!/static/js/lib.js>]}

cpath-clj.core.resources finds all locations on the classpath with the path static, then collects the URIs of all resources residing under those locations.

License

Copyright © 2014 Yannick Scherer

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close