newbie question: how to selectively iterate through a tree of directories ?

2015-10-03 Thread hpwei01
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 file

Re: newbie Q: how to tweak file-seq (original: how to selectively iterate through a tree of directories) ?

2015-10-03 Thread hpwei01
The directory structure is /path/top/dir1 /path/top/dir1/f1 /path/top/dir1/f2 /path/top/dir2 -> /another/path/dir2 -- /another/path/dir2/g1 /another/path/dir2/g2 I tried this (following suggestion): (for [file (file-seq dir) :while (.isFile file)] (.getPath file))

newbie Q: where is isSymbolicLink function and how to access it ?

2015-10-05 Thread hpwei01
In the clojure.java.io there are these two functions: isDirectory isFile But there is no isSymbolicLink (for unix, linux). (1) Could someone tell me where I can find such a function ? In another library not listed on clojure,org ?? (2) What do I need to do in order to use it ? Th