public static boolean checkForWrongCredentials(Throwable exception) {
    if (exception.getCause() != null) {
      return checkForWrongCredentials(exception.getCause());
    } else {
      String message = exception.getMessage();
      return
        exception instanceof SmbAuthException && message.contains("The specified network password is not correct") ||
          exception instanceof JSchException && message.contains("Auth fail");
    }


  }
Returns a file representation

@param filePath The file path
@param options  The filesystem options
@return a file representation
@throws FileSystemException
olv-vfs/src/main/java/pl/otros/vfs/browser/util/VFSUtils.java