I find a Way for send direct File Opperations to the FTP Endpoint.
from("jetty:http://localhost:7777/action/delete")
.process(new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
RemoteFileEndpoint<?> ftpEp = (RemoteFileEndpoint<?>)
getContext().getEndpoint("ftp://user@localhost/share?password=123");
RemoteFileOperations<?> operation =
ftpEp.createRemoteFileOperations();
operation.connect(ftpEp.getConfiguration());
boolean deleted =
operation.deleteFile(ftpEp.getConfiguration().getDirectory()+"/"+"fromJetty.txt");
exchange.getOut().setBody("DELETED = "+deleted);
operation.disconnect();
}
});
Debug and Trace really helps very much.
--
View this message in context:
http://camel.465427.n5.nabble.com/Howto-delete-file-from-FTP-Endpoint-direct-tp5749570p5749617.html
Sent from the Camel - Users mailing list archive at Nabble.com.