Under linux, I have a tree of directories like this:
/path/top
/path/top/dir1 (in here there are two files f1, f2)
/path/top/dir2 -> /another-path/dir2 (a symbolic link)
and under /another-path/dir2 there are two files g1, g2
If I use below code, I would get a list of files f1, f2, and g1, g2
(def directory (clojure.java.io/file "/path/top"))
(def files
(for [file (file-seq directory)] (.getName file)))
(files)
BUT I want to skip traversing the directory dir2 since it is a symbolic link.
i.e. the list of files that I want to get is f1, f2 only.
Could you please suggest a way to do this ?
THanks
HP