#include <vul_file_iterator.h>
*). It is efficient to use
for (vul_file_iterator fn="/dir"; fn; ++fn) { ... use fn() as filename }
for (vul_file_iterator fn="/dir.ext"; fn; ++fn) { ... use fn() as filename }
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 43 of file 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". | |
| vul_file_iterator (vcl_string const &glob) | |
| Initialize, and scan to get first file from "glob". | |
| ~vul_file_iterator () | |
| operator safe_bool () const | |
| Ask if done. | |
| bool | operator! () const |
| Inverse boolean value. | |
| char const * | operator() () |
| Return the currently pointed-to pathname. | |
| char const * | filename () |
| Return the non-directory part of the current pathname. | |
| char const * | match (int i) |
| Return the match for the i'th glob wildcard character (* or ?). | |
| vul_file_iterator & | operator++ () |
| Increment to the next file. | |
| void | reset (char const *glob) |
| Run a new match. | |
Protected Attributes | |
| vul_file_iterator_data * | p |
Private Member Functions | |
| vul_file_iterator | operator++ (int) |
Private Attributes | |
| VCL_SAFE_BOOL_DEFINE | |
|
|
Definition at line 48 of file vul_file_iterator.h. |
|
|
Initialize, and scan to get first file from "glob".
Definition at line 255 of file vul_file_iterator.cxx. |
|
|
Initialize, and scan to get first file from "glob".
Definition at line 261 of file vul_file_iterator.cxx. |
|
|
Definition at line 267 of file vul_file_iterator.cxx. |
|
|
Return the non-directory part of the current pathname.
Definition at line 283 of file vul_file_iterator.cxx. |
|
|
Return the match for the i'th glob wildcard character (* or ?). Uses the most recent glob result. |
|
|
Ask if done. Won't spin the disk Definition at line 288 of file vul_file_iterator.cxx. |
|
|
Inverse boolean value.
Definition at line 293 of file vul_file_iterator.cxx. |
|
|
Return the currently pointed-to pathname. Won't spin the disk Definition at line 278 of file vul_file_iterator.cxx. |
|
|
Definition at line 88 of file vul_file_iterator.h. |
|
|
Increment to the next file. Will spin the disk Definition at line 298 of file vul_file_iterator.cxx. |
|
|
Run a new match.
Definition at line 272 of file vul_file_iterator.cxx. |
|
|
Definition at line 84 of file vul_file_iterator.h. |
|
|
Definition at line 45 of file vul_file_iterator.h. |
1.4.4