I've been focusing on Clojure recently as a possible functional language to do systems scripting. Until, it dawned on me that having the JVM underneath means I'm limited to Java's capability.
So, how do I create a symlink? Or a hard link? I mean without (sh "ln" ...)
.
Ah, this is indeed a pain. I'm not sure the sh
option is all that bad, actually... Having said that, Ant provides a symlink task which you could use in a reasonably Clojure-friendly way through Lancet, the Ant wrapper originally introduced by Stuart Halloway in his "Programming Clojure" book and currently used internally by Leiningen. If you want to see the symlink task in action in Leiningen, have a look at this line in the 1.3.0 release.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With