Unix-like filesystem manipulation utilities for Clojure, wrapping Apache Commons IO.
file
size
mv
cp
cp-r
rm
rm-f
rm-r
rm-rf
touch
mkdir-p
chmod
exists?
leiningen
[clj-file-utils "0.1.3"]
maven
<dependency>
<groupId>clj-file-utils</groupId>
<artifactId>clj-file-utils</artifactId>
<version>0.1.3</version>
</dependency>
user=> (use 'clj-file-utils.core)
nil
user=> (exist "foo.txt")
false
user=> (touch "foo.txt")
nil
user=> (exists? "foo.txt")
true
user=> (rm "foo.txt")
nil
user=> (file "foo.txt")
#<File foo.txt>
user=> (.getParent (file "/path/to/foo.txt"))
"/path/to"
Extracted from http://github.com/mmcgrana/clj-garden by Mark McGranaghan mmcgrana@gmail.com Updates by Nate Murray nate@natemurray.com
Further updates by Ron Lusk ron.lusk@gmail.com