Package org.apache.commons.vfs.provider.ftp

Examples of org.apache.commons.vfs.provider.ftp.FtpFileSystemConfigBuilder


        super(launchSession, store);
    }
   
    public FileSystemOptions getOptions(URI uri) {
        FileSystemOptions options = new FileSystemOptions();   
        FtpFileSystemConfigBuilder c = FtpFileSystemConfigBuilder.getInstance();
        String mode = Property.getProperty(new ResourceKey("ftp.mode", this.getNetworkPlace().getResourceType(), this.getNetworkPlace().getResourceId()));
        c.setPassiveMode(options, mode.equals("passive"));
        int idleTimeout = Property.getPropertyInt(new ResourceKey("ftp.idleTimeout", getNetworkPlace().getResourceType(), getNetworkPlace().getResourceId()));
        c.setIdleTimeout(options, idleTimeout);
        // TODO: Add resource attribute for all these settings.
        c.setUserDirIsRoot(options, true);
        String hostType = Property.getProperty(new ResourceKey("ftp.hostType", this.getNetworkPlace().getResourceType(), this.getNetworkPlace().getResourceId()));
        if (!"automatic".equals(hostType)) {
            c.setEntryParser(options, hostType);
        }
        return options;
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.vfs.provider.ftp.FtpFileSystemConfigBuilder

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.