List of usage examples for org.apache.commons.net.ftp FTPCmd DELE
FTPCmd DELE
To view the source code for org.apache.commons.net.ftp FTPCmd DELE.
Click Source Link
From source file:com.adaptris.ftp.ApacheFtpClientImpl.java
/** * delete a file on the server/* www.jav a 2 s . c o m*/ * * @param remoteFile to be deleted */ @Override public void delete(String remoteFile) throws IOException { try { acquireLock(); log("{} {}", FTPCmd.DELE, remoteFile); handleReturnValue(ftpClient().deleteFile(remoteFile)); } finally { logReply(ftpClient().getReplyStrings()); releaseLock(); } }
From source file:com.atomicleopard.thundr.ftp.commons.FTP.java
/*** * A convenience method to send the FTP DELE command to the server, * receive the reply, and return the reply code. * <p>/*from w w w.j ava2 s . com*/ * @param pathname The pathname to delete. * @return The reply code received from the server. * @exception FTPConnectionClosedException * If the FTP server prematurely closes the connection as a result * of the client being idle or some other reason causing the server * to send FTP reply code 421. This exception may be caught either * as an IOException or independently as itself. * @exception IOException If an I/O error occurs while either sending the * command or receiving the server reply. ***/ public int dele(String pathname) throws IOException { return sendCommand(FTPCmd.DELE, pathname); }