curl-library
Re: creating remote directories via ftp
Date: Tue, 15 May 2001 10:41:33 -0700 (PDT)
I was able to get the CURL_QUOTE option to create
a remote directory. My only complaint is that
when I execute the curl_easy_perform function it
returns a directory listing. Is there a way to
turn this off?
If there is a wish list for enhancements to
libcurl, I would suggest that there be an option
to create directories. Perhaps something like
this:
curl_easy_setopt(curl, CURLOPT_URL,
"ftp://123.456.789.012/test/");
curl_easy_setopt(curl, CURLOPT_MKDIR, 1);
status = curl_easy_perform(curl);
OR (this might be a cleaner approach)
curl_easy_setopt(curl, CURLOPT_URL,
"ftp://123.456.789.012/");
curl_easy_setopt(curl, CURLOPT_MKDIR, "test");
status = curl_easy_perform(curl);
status could return 0 if successful,
CURL_DIR_EXISTS if the directory already exists,
or CURL_ERROR for any other error.
Keep up the good work!
Rodney
--- Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Mon, 14 May 2001, Rodney Simmons wrote:
>
> > Is there a way to create directories on a
> remote machine using the
> > libcurl ftp interface?
>
> Yes, there is. Although rather crude.
> (Suggestions on possible improvements
> in this area is welcome.)
>
> The options CURLOPT_QUOTE and CURLOPT_POSTQUOTE
> are what you're looking for.
> Do note that you need to figure out the FTP
> commands to issue by studying RFC
> 959.
>
> --
> Daniel Stenberg -- curl dude --
> http://curl.haxx.se/
>
>
> _______________________________________________
> Curl-library mailing list
> Curl-library_at_lists.sourceforge.net
>
http://lists.sourceforge.net/lists/listinfo/curl-library
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library
Received on 2001-05-15