curl-library
Re: libcurl FTP - directory listing by file mask
Date: Fri, 28 Mar 2008 15:48:43 +0000
> Dan, Built-in ftp clients on most platforms have mget functions
> implemented. You can issue a command 'mget *.txt' and you will receive
> all files that meet the mask.
The client is probably getting the full list and only showing those that match. Most clients struggle with mainframe and os/400 etc.
> I doubt that *.txt is legal as a file name
> on UNIX. I was unable to create a file with this name on HP-UX or
> Solaris. i
Try:
mkdir silly
cd silly
touch \*.txt
ls -l
> Also, try 'ls *.txt' or 'vi *.txt' It will list all files with
> *.txt extension and open *.txt files one after another.
That is because the shell expands this for you.
> So far I was unable to make CURLOPT_DIRLISTONLY to do a wildcard
> directory listing. This feature is critical for us. Please provide any
> suggestions.
>
CURLOPT_DIRLISTONLY will allow listing of the contents of a complete directory only.
I thought Dan explained the reasons quite well. Although I would like the options, I realise it needs careful consideration and would have to be designed properly to fit in with the way curl works.
Cheers
Mike
Received on 2008-03-28