Re: FTP Newbie

Giganews Newsgroups
Subject: Re: FTP Newbie
Posted by:  Remy Lebeau (Indy Team) (
Date: Thu, 18 Jan 2007

"Petter Topp" <…> wrote in message…

> I have been reading the documentation regarding FTP.Get and
> but these object do not discuss the issues of another Client Putting
a file at
> the same time as I try to Get the file.

There is nothing you can do about that on the client side.  It is the
server's responsibility to direct access to files.  If a client is
uploading a file, the server should lock the file until it is
finished.  But that is not a requirement, so many servers don't do
that.  You can usually download a file while it is being uploaded by
another client.

> Could there be concurrency problems between different client on
> the same file

Yes, there could be.

> or is this handled by the FTP Protocol / FTP Server?

There is nothing in the FTP protocol that addresses concurrency.  It
is an implementation detail.

> Could someone elaborate on this matter, and perhaps tell me how
> I could handle this in my FTP Client?

You can't handle it on the client side.  There is no way to know if a
file is currently in use on the server side.  If a file is being
uploaded, the server will either allow the download at the same time,
or it will reject it.  If rejected, an error message will be reported,
at least.  That is your only indicator that something is happening.
But if the download is accepted, then good luck.  It may be incomplete
or corrupted when iti s finished downloading.

> I have not found that the Methods FTP Get or FTP Delete returns
> specific errors/exceptions in a case like the one described. Are
there any?

That is dependant on the server.  If the server reports an error, such
as "Access deinied" then those methods will throw an exception.



In response to

FTP Newbie posted by Petter Topp on Thu, 18 Jan 2007