Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
4.6k views
in Java FTP by (340 points)
Hi,
I have a problem when I download a remote file, if the remote machine is currently writing on the file (i. e. the file is open for WRITE), I don't receive the whole contents.
Is there a way to check if the remote file is currently open for writing?
Thank You,

2 Answers

0 votes
by (162k points)
No, it is dependent on the server implementation. Ideally the server should lock the file so the download fails.

If you have control on the upload process (that is writing the file), it is best to write to a temporary filename and then rename to the desired target name. This reduces the possibility of your scenario occurring.
0 votes
by (340 points)
No, it is dependent on the server implementation. Ideally the server should lock the file so the download fails.

If you have control on the upload process (that is writing the file), it is best to write to a temporary filename and then rename to the desired target name. This reduces the possibility of your scenario occurring.


Many Thanks

Categories

...