commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel F. Savarese" <>
Subject Re: [FTP incomplete file transfer]
Date Sun, 27 May 2007 15:50:59 GMT

In message <>, "=?IS
O-8859-1?Q?Fran=E7ois_SENEQUIER?=" writes:
>So I would prefer trying to put a lock on the file before trying to download
>the file. So if the file is uploading, the lock will fail. The file is not

You can't lock a remote file on an FTP server from an FTP client.

>Or have you got another way to solve the problem ?

I can think of a couple of kluges that all have problems, but your best
bet is probably to list the file, wait 5 to 10 seconds and then list
it again.  If the file size increased, then the file is being uploaded.
If the file size doesn't change, that's no guarantee the file is safe
to download (because the upload may have stalled), but at least it
will work for a good percentage of the cases you encounter.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message