cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Setting Local Directory for an ftpget

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 19 Dec 2011 14:17:16 +0100 (CET)

On Mon, 19 Dec 2011, SuperWare Support wrote:

> I'm implementing an ftp get using libcurl. I searched the documentation,
> but couldn't find an option for setting the local directory to write the
> file to.

This sounds like you've not really looked into the documentation. libcurl
won't save to any file name at all, you never provide that. You take care of
the saving basically. Have a look at this example:

   http://curl.haxx.se/libcurl/c/ftpget.html

> I know I could modify the file_is_comming callback function to set it to a
> static location

Why would you have it static if you want to have it changeable? Just change it
as you like!

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-12-19