public static boolean isDirectory(FileObject fileObject) {
    try {
      return fileObject.getType().equals(FileType.FOLDER);
    } catch (FileSystemException ex) {
      LOGGER.info("Exception when checking if fileobject is folder", ex);
      return false;
    }
  }
y

@param fileObject A file object representation
@return whether a file object is a directory
olv-vfs/src/main/java/pl/otros/vfs/browser/util/VFSUtils.java