VideoTools
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
G::DirectoryIterator Class Reference

A Directory iterator. More...

#include <gdirectory.h>

Public Member Functions

 DirectoryIterator (const Directory &dir)
 Constructor taking a directory reference. More...
 
 ~DirectoryIterator ()
 Destructor.
 
bool error () const
 Returns true on error. The caller should stop the iteration.
 
bool more ()
 Returns true if more and advances by one.
 
bool isDir () const
 Returns true if the current item is a directory.
 
std::string sizeString () const
 Returns the file size as a decimal string. More...
 
Path filePath () const
 Returns the path of the current item.
 
std::string fileName () const
 Returns the name of the current item.
 

Detailed Description

A Directory iterator.

The iteration model is

while(iter.more()) { (void)iter.filePath() ; }

Definition at line 102 of file gdirectory.h.

Constructor & Destructor Documentation

G::DirectoryIterator::DirectoryIterator ( const Directory dir)
explicit

Constructor taking a directory reference.

Iterates over all files in the directory.

Definition at line 124 of file gdirectory_unix.cpp.

Member Function Documentation

std::string G::DirectoryIterator::sizeString ( ) const

Returns the file size as a decimal string.

The value may be more than 32 bits. See also class G::Number.

Definition at line 154 of file gdirectory_unix.cpp.


The documentation for this class was generated from the following files: