Reputation: 86747
I'm synchronizing an folder using FtpInboundFileSynchronizer.synchronizeToLocalDirectory()
.
Unfortunately only new files are downloaded, but files not present on the ftp are not removed locally. How can I configure the class to automatically remove any nonexisting files also locally?
Upvotes: 1
Views: 173
Reputation: 174554
That's not currently supported by the synchronizer.
You could implement it with a couple of FtpOutboundGateway
s; first use a gateway to LS the remote directory and remove local files that don't exist remotely; then use a gateway to GET the missing files.
You could also do it programmatically with an FtpRemoteFileTemplate
.
Upvotes: 1