Topic: Return list of directories that matches the pattern
Author: mohitanchlia@gmail.com
Date: Mon, 20 Aug 2007 15:21:55 CST Raw View
I've been looking around but don't seem to find anything that returns
the list of directory for a given pattern. For Eg: in C/C++ how do I
get all the files or directories for pattern 12* or AB*
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Author: Greg Herlihy <greghe@pacbell.net>
Date: Tue, 21 Aug 2007 08:17:55 CST Raw View
On Aug 20, 2:21 pm, mohitanch...@gmail.com wrote:
> I've been looking around but don't seem to find anything that returns
> the list of directory for a given pattern. For Eg: in C/C++ how do I
> get all the files or directories for pattern 12* or AB*
Neither the C nor C++ Standard Library specify any file "globbing"
routines - at least that I was able to find (and, no, I did not make
the word "globbing" up as a joke, it's really called that). So I
recommend consulting a different Standard, specifically, IEEE Std
1003.2 (better known as "POSIX.2") and which does specify a "glob()"
routine that should meet your needs.
Greg
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Author: Greg Herlihy <greghe@pacbell.net>
Date: Tue, 21 Aug 2007 09:34:44 CST Raw View
On Aug 20, 2:21 pm, mohitanch...@gmail.com wrote:
> I've been looking around but don't seem to find anything that returns
> the list of directory for a given pattern. For Eg: in C/C++ how do I
> get all the files or directories for pattern 12* or AB*
Neither the C nor C++ Standard Library specify any file "globbing"
routines - at least that I was able to find (and, no, I did not make
the word "globbing" up as a joke, it's really called that). So I
recommend consulting a different Standard, specifically, IEEE Std
1003.2 (better known as "POSIX.2") and which does specify a "glob()"
routine that should meet your needs.
Greg
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]