public static FileObject resolveFileObject(String filePath) throws FileSystemException {
    LOGGER.info("Resolving file: {}", URI_UTILS.getFriendlyURI(filePath));

    FileSystemOptions options = new FileSystemOptions();
    if (filePath.startsWith("sftp://")) {
      SftpFileSystemConfigBuilder builder = SftpFileSystemConfigBuilder.getInstance();
      builder.setStrictHostKeyChecking(options, "no");
      builder.setUserDirIsRoot(options, false);
      builder.setCompression(options, "zlib,none");
      builder.setDisableDetectExecChannel(options, true); // see https://issues.apache.org/jira/browse/VFS-818

    } else if (filePath.startsWith("smb://")) {

    } else if (filePath.startsWith("ftp://")) {
      FtpFileSystemConfigBuilder.getInstance().setPassiveMode(options, true);
    }

    //Getting user, password, keyfile or pageant auth information and set it.
    UserAuthenticatorFactory factory = new UserAuthenticatorFactory();
    OtrosUserAuthenticator authenticator = factory.getUiUserAuthenticator(persistentAuthStore, sessionAuthStore, filePath, options);
    if (pathContainsCredentials(filePath)) {
      authenticator = null;
    }
    DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(options, authenticator);

    return resolveFileObject(filePath, options, null, persistentAuthStore, sessionAuthStore);
  }
Returns a file representation

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