List of usage examples for org.apache.commons.net.ftp FTPSClient rename
public boolean rename(String from, String to) throws IOException
From source file:ddf.test.itests.catalog.TestFtp.java
/** * Test the ftp command sequence of uploading a dot-file (i.e. .foo) and then renaming that file * to the final filename (i.e. test.txt). Confirm that the catalog contains only one object and * the title of that object is "test.txt". *//* w ww.j a va 2s . c o m*/ @Test public void testFtpsPutDotFile() throws Exception { setClientAuthConfiguration(NEED); FTPSClient client = createSecureClient(true); String dotFilename = ".foo"; String finalFilename = "test.txt"; ftpPut(client, SAMPLE_DATA, dotFilename); boolean ret = client.rename(dotFilename, finalFilename); assertTrue(ret); verifyIngest(1, finalFilename); }