[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ftpapi - FTP_get() with a (replace option?



Sender: Scott Klement <klemscot@xxxxxxxxxxxx>



On Tue, 1 Oct 2002, Richard B Baird wrote:
>
> 1.  does the FTP_get() function use '(replace'?
>

FTP_get() will replace any data in the file, yes.  I have to admit that
the keyword "(REPLACE" is oddity to me...  I've never seen that in any
other FTP client besides the one that comes with OS/400.

> 2.  if not, does the function fail if the file already exists?

No, it clears the file.

> 3.  is there a way to control this aspect? either by a different function,
> or a passed value to the existing one?
> 4.  or should I just control it myself by doing an existance test locally?

Just do the existence test locally.   Don't call FTP_get() if you don't
want to replace the data.

This is an open-source project.  If you feel that FTP_get should have an
equivalent of "(REPLACE" then feel free to add such a thing to the code.
Just make sure you don't break backwards-compatibility, and I'll be happy
to include it in the main distro.



-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------