Discuss (FTP) and (SFTP, FTPS and SCP), our Java file transfer clients.
no avatar
User

ashosheh

Posts

7

Joined

Thu Jan 13, 2011 7:31 pm

Location

JO

Download currently open file at a remote machine

by ashosheh » Thu Jan 13, 2011 7:36 pm

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,
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: Download currently open file at a remote machine

by support2 » Thu Jan 13, 2011 8:00 pm

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.
no avatar
User

ashosheh

Posts

7

Joined

Thu Jan 13, 2011 7:31 pm

Location

JO

Re: Download currently open file at a remote machine

by ashosheh » Thu Jan 13, 2011 8:53 pm


Who is online

Users browsing this forum: No registered users and 117 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign