Example usage for org.apache.commons.net.ftp FTPSClient makeDirectory

List of usage examples for org.apache.commons.net.ftp FTPSClient makeDirectory

Introduction

In this page you can find the example usage for org.apache.commons.net.ftp FTPSClient makeDirectory.

Prototype

public boolean makeDirectory(String pathname) throws IOException 

Source Link

Document

Creates a new subdirectory on the FTP server in the current directory (if a relative pathname is given) or where specified (if an absolute pathname is given).

Usage

From source file:ddf.test.itests.catalog.TestFtp.java

@Test
public void testFtpsMkdirCwdPutFile() throws Exception {

    setClientAuthConfiguration(NEED);//  w w w .j a v a2  s  .c  o  m
    FTPSClient client = createSecureClient(true);

    String newDir = "newDirectory";
    String finalFilename = "test.txt";

    boolean ret = client.makeDirectory(newDir);
    assertTrue(ret);
    ret = client.changeWorkingDirectory(newDir);
    assertTrue(ret);
    ftpPut(client, SAMPLE_DATA, finalFilename);

    verifyIngest(1, finalFilename);
}