List of usage examples for org.apache.commons.net.ftp FTPClient removeDirectory
public boolean removeDirectory(String pathname) throws IOException
From source file:view.GenerujTest.java
private void sendfile() { FTPClient client = new FTPClient(); FileInputStream fis = null;//from w ww.j a v a 2s.co m try { client.connect("ftp.serwer1749827.home.pl"); client.login("serwer", "serwer123456"); // // Create an InputStream of the file to be uploaded // client.removeDirectory("index.html"); String filename = "index.html"; fis = new FileInputStream(filename); // // Store file to server // client.storeFile(filename, fis); client.logout(); } catch (IOException e) { e.printStackTrace(); } finally { try { if (fis != null) { fis.close(); } client.disconnect(); } catch (IOException e) { e.printStackTrace(); } } }