You can use clojure.java.io/file to create paths in the (neutral) platform, as with os.path.join in Python or File.join in Ruby.
(require '[clojure.java.io :as io]) ;; On Linux (def home "/home/jbm") (io/file home "media" "music") ;=>
clojure.java.io/file returns java.io.File . If you need to return to the line, you can always use .getPath :
(-> home (io/file "media" "music") (.getPath)) ;=> /home/jbm/media/music"
Is that what you meant?
In addition to clojure.java.io (and, of course, the methods on java.io.File ), raynes.fs is a popular file system.
jbm
source share