title: Java 1.6 - determine symbolic links
body: <p>In a DirectoryWalker class I want to find out if a File instance is actually a symbolic link to a directory (assuming, the walker walks on UNIX systems). Given, I already know the instance is a directory, would the following be a reliable condition to determine the symbolic link?</p>
  
  <pre><code>File file;
  // ...      
  if (file.getAbsolutePath().equals(file.getCanonicalPath())) {
      // real directory ---&gt; do normal stuff      
  }
  else {
      // possible symbolic link ---&gt; do link stuff
  }
  </code></pre>