On 2010-05-12, Stuart Halloway <stuart.hallo...@gmail.com> wrote: > I would like to stop following symlinks, but It doesn't appear that > the File API has any ability to detect symlinks.
It sounds as if Java7 will finally support dealing with symlinks via NIO.2 <http://java.sun.com/developer/technicalArticles/javase/nio/#5> > How were you thinking about doing this? The way Ant does it is by comparing the absolute file name with its canonical name. Actually it's a bit more complex than that, see isSymbolicLink in <http://svn.apache.org/repos/asf/ant/core/trunk/src/main/org/apache/tools/ant/util/SymbolicLinkUtils.java> I should note that getCanonicalPath is a memory and performance hog (IIUC the Java class library keeps a cache of File -> canonical path). Stefan -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en