Public Member Functions | |
| dir_iter () | |
| dir_iter (std::string const &dirname) | |
| bool | is_directory () |
| Returns true if the current object is a directory. | |
| bool | is_hidden () |
| Returns true if the current object is hidden. | |
| std::string | filename () |
| Get the filename fo the current object. | |
| void | operator++ () |
| bool | operator!= (const dir_iter &it) |
Example of use:
for (dir_iter it("C:/temp"); it != dir_iter(); ++it) { if (it.is_hidden()) continue; if (it.is_directory()) printf("Directory: '%s'\n", it.filename().c_str()); else printf("File: '%s'\n", it.filename().c_str()); }
|
|
The dir_iter class provides a cross-platform way to read directories. |
1.4.5