Iterate through directories and/or "glob" patterns (*. More...
#include <vul_file_iterator.h>
Public Member Functions | |
| vul_file_iterator () | |
| vul_file_iterator (char const *glob) | |
| Initialize, and scan to get first file from "glob". More... | |
| vul_file_iterator (std::string const &glob) | |
| Initialize, and scan to get first file from "glob". More... | |
| ~vul_file_iterator () | |
| operator bool () const | |
| Ask if done. More... | |
| bool | operator! () const |
| Inverse boolean value. More... | |
| char const * | operator() () |
| Return the currently pointed-to pathname. More... | |
| char const * | filename () |
| Return the non-directory part of the current pathname. More... | |
| char const * | match (int i) |
| Return the match for the i'th glob wildcard character (* or ?). More... | |
| vul_file_iterator & | operator++ () |
| Increment to the next file. More... | |
| void | reset (char const *glob) |
| Run a new match. More... | |
Protected Attributes | |
| vul_file_iterator_data * | p |
Private Member Functions | |
| vul_file_iterator | operator++ (int) |
Iterate through directories and/or "glob" patterns (*.
*). It is efficient to use
simply to list the contents of a directory. If you really want just the *.ext files, it is efficient to use
rather than opendir/glob/etc.
Valid glob patterns are unix-like - '?' matches precisely one character '*' matches any sequence (including empty), [abc] matches either 'a' or 'b' or 'c'
Definition at line 47 of file vul_file_iterator.h.
|
inline |
Definition at line 52 of file vul_file_iterator.h.
| vul_file_iterator::vul_file_iterator | ( | char const * | glob | ) |
Initialize, and scan to get first file from "glob".
Definition at line 255 of file vul_file_iterator.cxx.
| vul_file_iterator::vul_file_iterator | ( | std::string const & | glob | ) |
Initialize, and scan to get first file from "glob".
Definition at line 261 of file vul_file_iterator.cxx.
| vul_file_iterator::~vul_file_iterator | ( | ) |
Definition at line 267 of file vul_file_iterator.cxx.
| char const * vul_file_iterator::filename | ( | ) |
Return the non-directory part of the current pathname.
Definition at line 283 of file vul_file_iterator.cxx.
| char const* vul_file_iterator::match | ( | int | i | ) |
Return the match for the i'th glob wildcard character (* or ?).
Uses the most recent glob result.
|
explicit |
| bool vul_file_iterator::operator! | ( | ) | const |
Inverse boolean value.
Definition at line 293 of file vul_file_iterator.cxx.
| char const * vul_file_iterator::operator() | ( | ) |
Return the currently pointed-to pathname.
Won't spin the disk
Definition at line 278 of file vul_file_iterator.cxx.
| vul_file_iterator & vul_file_iterator::operator++ | ( | ) |
Increment to the next file.
Will spin the disk
Definition at line 298 of file vul_file_iterator.cxx.
|
inlineprivate |
Definition at line 92 of file vul_file_iterator.h.
| void vul_file_iterator::reset | ( | char const * | glob | ) |
Run a new match.
Definition at line 272 of file vul_file_iterator.cxx.
|
protected |
Definition at line 88 of file vul_file_iterator.h.
1.8.15