Examples of changeDirectory()


Examples of com.enterprisedt.net.ftp.FileTransferClient.changeDirectory()

            ftp.connect();
            log.info("Connected and logged in to server " + host);

            log.info("Current dir: " + ftp.getRemoteDirectory());
            log.info("Changing directory");
            ftp.changeDirectory(dir);
            log.info("Current dir: " + ftp.getRemoteDirectory());

            log.info("Changing up");
            ftp.changeToParentDirectory();
            log.info("Current dir: " + ftp.getRemoteDirectory());
View Full Code Here

Examples of it.sauronsoftware.ftp4j.FTPClient.changeDirectory()

        final FTPClient client = this.getClient();
        if (null != client
                && client.isConnected()
                && StringUtils.hasText(_workingFolder)) {
            try {
                client.changeDirectory("/");
                final LinkedList<String> list = new LinkedList<String>();
                this.getChildren(client,
                        list, "",
                        0, deepLevel);
View Full Code Here

Examples of it.sauronsoftware.ftp4j.FTPClient.changeDirectory()

        final FTPClient client = this.getClient();
        if (null != client
                && client.isConnected()
                && StringUtils.hasText(_workingFolder)) {
            try {
                client.changeDirectory("/");
                if (!_workingFolder.equalsIgnoreCase("/")) {
                    client.createDirectory(_workingFolder);
                }
                return true;
            } catch (FTPException ex) {
View Full Code Here

Examples of it.sauronsoftware.ftp4j.FTPClient.changeDirectory()

        final FTPClient client = this.getClient();
        if (null != client
                && client.isConnected()
                && StringUtils.hasText(_fileName)) {
            try {
                client.changeDirectory("/");
                if (StringUtils.hasText(_workingFolder)) {
                    client.changeDirectory(_workingFolder);
                }
                client.download(_fileName, temp);
            } catch (FTPException ex) {
View Full Code Here

Examples of it.sauronsoftware.ftp4j.FTPClient.changeDirectory()

                && client.isConnected()
                && StringUtils.hasText(_fileName)) {
            try {
                client.changeDirectory("/");
                if (StringUtils.hasText(_workingFolder)) {
                    client.changeDirectory(_workingFolder);
                }
                client.download(_fileName, temp);
            } catch (FTPException ex) {
                // file doe not exists, file not found
                if (ex.getCode() != 450
View Full Code Here

Examples of it.sauronsoftware.ftp4j.FTPClient.changeDirectory()

                && client.isConnected()
                && StringUtils.hasText(_fileName)) {
            if (file.exists()) {
                final FileInputStream is = new FileInputStream(file);
                try {
                    client.changeDirectory("/");
                    if (StringUtils.hasText(_workingFolder)) {
                        client.changeDirectory(_workingFolder);
                    }
                    client.upload(_fileName, is, 0, 0, null);
                } finally {
View Full Code Here

Examples of it.sauronsoftware.ftp4j.FTPClient.changeDirectory()

            if (file.exists()) {
                final FileInputStream is = new FileInputStream(file);
                try {
                    client.changeDirectory("/");
                    if (StringUtils.hasText(_workingFolder)) {
                        client.changeDirectory(_workingFolder);
                    }
                    client.upload(_fileName, is, 0, 0, null);
                } finally {
                    is.close();
                }
View Full Code Here

Examples of it.sauronsoftware.ftp4j.FTPClient.changeDirectory()

        }

        FTPClient client = new FTPClient();
        client.connect(Shared.getConfig("ftpBackupAddr"), Integer.parseInt(Shared.getConfig("ftpPort")));
        client.login(Shared.getConfig("ftpBackupUser"), Shared.getConfig("ftpBackupPassword"));
        client.changeDirectory("/" + Shared.getConfig("storeName"));
        File f = new File(Constants.tmpDir + fileName);
        client.upload(f);
        client.disconnect(false);

    }
View Full Code Here

Examples of it.sauronsoftware.ftp4j.FTPClient.changeDirectory()

            if ( mode.equals("FTP") ){
                FTPClient client = new FTPClient();
                client.connect(Shared.getConfig("ftpHost"));
                client.login(Shared.getConfig("ftpUser"), Shared.getConfig("ftpPass"));
                client.changeDirectory(Shared.getConfig("ftpDir"));
                File ff = new File(Constants.tmpDir + Shared.getConfig("tmpFtpFileName"));
                client.download("GT99_A09.rar", ff );
                client.disconnect(false);
                Shared.prepareMovements( ff );
            }else if ( mode.equals("File") ) {
View Full Code Here

Examples of org.apache.ftpserver.ftplet.FileSystemView.changeDirectory()

       
        // change directory
        FileSystemView fsview = session.getFileSystemView();
        boolean success = false;
        try {
            success = fsview.changeDirectory(dirName);
        }
        catch(Exception ex) {
            LOG.debug("Failed to change directory in file system", ex);
        }
        if(success) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.