cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Listing many many files in dir with pattern matching

From: Mehmet Bozkurt <mehmet.bozkurt_at_xware.se>
Date: Wed, 20 Oct 2010 12:14:21 +0200

Hi!

Today I use CURLOPT_WILDCARDMATCH when I want to list files in a directory
according to a given pattern, such as *.txt.
I'm only interested in the files names, no file data is read
(CURL_CHUNK_BGN_FUNC_SKIP is returned).
Is there any other way to do this not using _WILDCARDMATCH?
I have noticed that when I have a very large number of files matching a
given pattern
I get a stack overflow exception due to the recursion in ftp.c:: static
CURLcode wc_statemach(struct connectdata *conn)

I'm currently using libcurl 7.21.1.

I guess one way would be to do a regular NLST and then do the pattern
matching.

Best regards,
Mehmet.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-10-20

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET