FTP: check whether file is closed

Posted by Andrey on Stack Overflow See other posts from Stack Overflow or by Andrey
Published on 2010-05-27T09:04:54Z Indexed on 2010/05/27 9:11 UTC
Read the original article Hit count: 152

Filed under:

Hello!

My FTP client (apache commons ftpclient) needs to download file from FTP.

The problem is that an external service may not have finished writing to this file before I start downloading.

Is there any way to determine via FTP whether the file is already closed (i.e. there is no writing handlers opened)?

The problem is that I cannot synchronize with that external service. But I mustn't download file which is not finished yet (a large JPEG).

Thanks in advance!

© Stack Overflow or respective owner

Related posts about ftp