aric_luri wrote:
> Hi,
> I'm trying to write function that write content of directory but can
> get wildcards (global expressions).
>
> I wrote this code for finding all files begin with 'g' under
> /usr/local/bin
>
> std::string globExpr = /usr/local/bin/g*
> glob_t globbuf;
> int status = glob( globExpr.c_str(), GLOB_DOOFFS, NULL, &globbuf );
>
> But I get status == 1 which is bad according to the manual pages.
>
> Does any one knows how can I do file globbing?
>
> Thanks, Uri.
The _standard_ C++ language has no facilities for platform specific
issues such as directories. You'll need to ask the experts in a
newsgroup dedicated to your platform. Read the FAQ and welcome.txt
below for more assistance.
--
Thomas Matthews
C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq:
http://www.parashift.com/c++-faq-lite
C Faq:
http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book