title: How to check if filesystem supports links and symlinks in Java
body: <p>The <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#createSymbolicLink%28java.nio.file.Path,%20java.nio.file.Path,%20java.nio.file.attribute.FileAttribute...%29" rel="noreferrer">Files</a> class introduced in Java 7 has methods for handling links and symlinks but only as <em>optional operations</em>.</p>
  
  <p>Is there any way of determining at runtime if a file system supports these operations before actually invoking the respective methods or do I need to call them and then catch the exception?</p>
  
  <p>Classes like <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/file/FileSystem.html" rel="noreferrer">FileSystem</a> or <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/file/FileStore.html" rel="noreferrer">FileStore</a> do not seem to contain anything in that regard (or I overlooked it).</p>