Package org.apache.commons.vfs

Examples of org.apache.commons.vfs.FileSystemOptions$FileSystemOptionKey


        //SftpFileSystemConfigBuilder.getInstance().setIdentities(opts, privateKeys);
        //SftpFileSystemConfigBuilder.getInstance().setKnownHosts(opts, new java.io.File("/home/djm76/.ssh/known_hosts"));
        SshTrustAllHostsUserInfo ui = new SshTrustAllHostsUserInfo();
        ui.setPassword(this.sftpPassword);
        ui.setPassphrase(this.sftpPassword);
        FileSystemOptions defaultOpts = new FileSystemOptions();
        SftpFileSystemConfigBuilder.getInstance().setUserInfo(defaultOpts, ui);
        // timeout
        //SftpFileSystemConfigBuilder.getInstance().setTimeout(defaultOpts, 100);
        // userDirIsRoot
        // if you set the sftp path (e.g. /tmp) and also setUserDirIsRoot(opts, true)
View Full Code Here


      throw new NullPointerException();
    }

    WebSolutionFileProvider.setConnectionTimeout(getTimeout(loginData) * 1000);
    final String normalizedUrl = normalizeURL(loginData.getUrl());
    final FileSystemOptions fileSystemOptions = new FileSystemOptions();
    final DefaultFileSystemConfigBuilder configBuilder = new DefaultFileSystemConfigBuilder();
    configBuilder.setUserAuthenticator(fileSystemOptions, new StaticUserAuthenticator(normalizedUrl,
        loginData.getUsername(), loginData.getPassword()));
    return fileSystemManager.resolveFile(normalizedUrl, fileSystemOptions);
  }
View Full Code Here

              // Set the manager
            if (manager == null) {
              manager = VFS.getManager();
            }
              // Build a new file system options object
              this.fileSystemOptions = new FileSystemOptions();
              StaticUserAuthenticator auth = new StaticUserAuthenticator(null, connectionProperties.getUsername(), connectionProperties.getPassword());
              DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(fileSystemOptions, auth);
              if(connectionProperties.getType().equals("ftp")) {               
          //FtpFileSystemConfigBuilder.getInstance().setPassiveMode(fileSystemOptions, connectionProperties.getPassive());
          FtpFileSystemConfigBuilder.getInstance().setDataTimeout(fileSystemOptions, connectionProperties.getTimeoutSeconds() * 10);
 
View Full Code Here

     *
     */
    public FTPConnectionProperties(String connectionId) {
      storageDirectory = new File(CFMLPlugin.getDefault().getStateLocation().toString() + "/ftpconnections");
      connectionProperties = new Properties();
        fileSystemOptions = new FileSystemOptions();
     
      if (connectionId != null) {
        setConnectionid(connectionId);
        String[] connections = getConnectionIds();
        for (int i=0;i<connections.length;i++) {
View Full Code Here

    public S3Shell () throws FileNotFoundException, IOException {
        Properties config = new Properties();
        config.load(new FileInputStream("config.properties"));

        StaticUserAuthenticator auth = new StaticUserAuthenticator(null, config.getProperty("aws.key-id"), config.getProperty("aws.key"));
        FileSystemOptions opts = S3FileProvider.getDefaultFileSystemOptions();
        DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(opts, auth);

        fsManager = VFS.getManager();

    }
View Full Code Here

TOP

Related Classes of org.apache.commons.vfs.FileSystemOptions$FileSystemOptionKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.