Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
4.6k views
in Java FTP by (160 points)
Hi,

I am using edtftpj-1.5.3 to do some file downloading. While I was testing my program in a scenario where the internet connection get lost while file is still in the progress of downloading. The partially downloaded file is being deleted away.

From the .Net forum, I notice that there is a "DeleteOnFailure" property which can be set to false to prevent the file from being deleted when the connection dies off. May I know if there is such a capability in edtftpj-1.5.3 too. Or is there any way in which I can prevent the deletion from happening.

Thanks & Regards,
Lain

8 Answers

0 votes
by (162k points)
setDeleteOnFailure(false)
0 votes
by (160 points)
Hmm... May I know what class has this method. I have looked in the ftpclient class. But didn't saw this method.

Thanks
0 votes
by (360 points)
tsmin21 i had the exact same problem.. it's very ennoying i know..
it seems that the setDeleteOnFailure() method is available only in the pro version.

you can implement your own method making sure that it changes the void getData(String localPath, String remoteFile) method in the FTPClient class.

in the 1.5.4 version of the free client, you can find the exact line you need to change on line 1972.
0 votes
by (51.6k points)
Sorry for not replying to this thread sooner. When I read tsmin21's message first time I couldn't understand why he/she couldn't find this method. I just checked our CVS history and it turns out that FTPClient.setDeleteOnFailure was added to the free code-base in March this year. Since there's been no release of the free version since January, it is not yet available. We have released a new Pro version since this time, which is why you can see the method there. I'm not sure when we're planning the next free release, but I will try to get an estimated date for you.

- Hans (EnterpriseDT)
0 votes
by (162k points)
Sorry about that ... we plan to get a new release of edtFTPj out by the end of May.
0 votes
by (360 points)
EDT Support wrote:
I just checked our CVS history and it turns out that...


can we have access to the cvs for current versions of the free-code edtFTPj ?
0 votes
by (51.6k points)
There's no fundamental reason why we couldn't do that since obviously all the source-code for our free product is already published on our website anyway. However, it would require us to make a lot of changes to the way we do things in relation to our commercial products, so it's not really practical for the foreseeable future. If it's really urgent that you get the latest version our build-master might be persuaded to send it it you before the official release. Is it really urgent?

- Hans (EnterpriseDT)
0 votes
by (360 points)
no it's not at all urgent, i just asked from curiosity. it would just be a good solution for cases like the one with setDeleteOnFailure() method..

thank you for the offer though :)

Categories

...