Examples of FtpServer


Examples of org.apache.ftpserver.FtpServer

        CommandLine cli = new CommandLine();
        try {

            // get configuration
            FtpServer server = cli.getConfiguration(args);
            if (server == null) {
                return;
            }

            // start the server
            server.start();
            System.out.println("FtpServer started");

            // add shutdown hook if possible
            cli.addShutdownHook(server);
        } catch (Exception ex) {
View Full Code Here

Examples of org.h2.dev.ftp.server.FtpServer

        IOUtils.delete(getBaseDir() + "/test");
    }

    private void test(String dir) throws Exception {
        Server server = FtpServer.createFtpServer("-ftpDir", dir, "-ftpPort", "8121").start();
        FtpServer ftp = (FtpServer) server.getService();
        ftp.setEventListener(this);
        FtpClient client = FtpClient.open("localhost:8121");
        client.login("sa", "sa");
        client.makeDirectory("test");
        client.changeWorkingDirectory("test");
        assertEquals("CWD", lastEvent.getCommand());
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.