cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLOPT_CREATE_MISSING_DIRS and empty folders

From: Silex <silex0r_at_gmail.com>
Date: Sun, 19 Feb 2006 13:46:21 +0100

>
> Yes, but then you tried to upload a file to a URL without a file name
> part,
> right? What did you expect to happen when you did that? (I'm not saying
> (nil)
> is right, I just don't understand what you wanted it to do.)

Yes that's what I tried, ok so I will no try that again.

CREATE_MISSING_DIRS should work equally fine for both downloads and uploads.
> I
> don't think your problem is related to the CREATE_MISSING_DIRS option at
> all.

It's indeed not, I think an example explains more what I'm trying to do :

Say I have a file tree like this that I want to upload:

foo/a.txt
foo/b.txt
bar/
x.txt
y.txt

So, for a.txt, b.txt, x.txt and y.txt I just set the url like
ftp://server.com/foo/a.txt with the option CREATE_MISSING_DIRS and UPLOAD
and I perform() and the directory foo is created and everyone is happy etc.

Now for the bar directory, what am I supposed to do ?

From our discussion, I understand I should do smth like set the url to
ftp://server.com/bar/ then set the options CREATE_MISSING_DIRS and NOBODY ?
Did I get it right ?

Thank you again :)
Philippe Vaucher
Received on 2006-02-19