Re: Need Help! - glob function in c++

Discussion in 'C++' started by Thomas Matthews, Aug 27, 2003.

  1. 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
     
    Thomas Matthews, Aug 27, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Georgy Pruss
    Replies:
    15
    Views:
    725
    Tim Roberts
    Dec 1, 2003
  2. Tim Peters
    Replies:
    1
    Views:
    360
    Duncan Booth
    Dec 1, 2003
  3. Sean Berry

    Question about glob.glob <--newbie

    Sean Berry, May 4, 2004, in forum: Python
    Replies:
    3
    Views:
    347
    David M. Cooke
    May 4, 2004
  4. Elbert Lev

    glob.glob unicode bug or feature

    Elbert Lev, Jul 31, 2004, in forum: Python
    Replies:
    5
    Views:
    397
    Neil Hodgson
    Aug 2, 2004
  5. Hitesh

    glob.glob output

    Hitesh, Mar 12, 2007, in forum: Python
    Replies:
    6
    Views:
    403
    Hitesh
    Mar 13, 2007
Loading...

Share This Page