dir_iter Class Reference

List of all members.

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)

Detailed Description

A portable class for reading directory contents.

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());
    }


Constructor & Destructor Documentation

dir_iter::dir_iter  ) 
 

The dir_iter class provides a cross-platform way to read directories.


Generated on Tue Apr 22 10:10:59 2008 for vtdata library by  doxygen 1.4.5