cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: ftp client questions.

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 26 May 2003 10:09:06 +0200 (CEST)

On Mon, 26 May 2003, Kurt Knudsen wrote:

> First time doing this so i dont know if im doing it right or not :)

Welcome!

(You should not reply to an earlier mail but instead post a new one with a
relevant subject when you are in fact starting a totally new thread.)

> Anyway, Im trying to convert my WinInet FTP Client (very basic) to cURL so
> i can get some additional support for dates, if at all possible, the FTP
> servers are glFTPd as far as i know.

Dates over FTP is a mess. In general.

> Here are my questions. Ive read the manual and most other examples and docs
> I could find, and Im still rather confused. I need to login, cwd to a
> directory, get a list of dirs in that directory, with dates preferably
> (main reason im converting to curl), make that list of dirs into an array,
> step through the array, going in each dir 1 at a time, and doing LIST
> *.txt, pretty much convert FtpFindFirstFile()/FtpFindNextFile() to curl.
> Grab all the files that match the *.txt, and go to the next dir, when it
> finishes with the array, simply log off.

And where did your efforts and tests stop because libcurl wouldn't let you or
you couldn't understand where to go next?

> I read the basic ftpget example and is simply not enough, does anyone know
> of any examples that use curl for what i need..

The examples in the release archives and on the web site are the ones I've
got.

> if it seems confusing let me know ill try my best to explain and/or post
> code of the WinInet that i want to convert.

I doubt that helps. Most of us here have never seen nor used WinInet and you
won't get more help by that.

I suggest you plunge into libcurl-hacking and you ask specific questions
about libcurl and how to make things happen using libcurl.

> I have it wrapped up in a class so if i convert to curl i wanted to keep
> the same functions i use in the main program (GetFile(), Connect(), etc)

I wouldn't be so sure I could maintain the same functinons as libcurl may
introduce another paradigm of how to do this.

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
Received on 2003-05-26