Poco

class DirectoryIterator

Library: Foundation
Package: Filesystem
Header: Poco/DirectoryIterator.h

Description

The DirectoryIterator class is used to enumerate all files in a directory.

DirectoryIterator has some limitations:

Member Summary

Member Functions: name, operator, operator !=, operator *, operator ++, operator =, operator->, path

Constructors

DirectoryIterator

DirectoryIterator();

Creates the end iterator.

DirectoryIterator

DirectoryIterator(
    const std::string & path
);

Creates a directory iterator for the given path.

DirectoryIterator

DirectoryIterator(
    const DirectoryIterator & iterator
);

Creates a directory iterator for the given path.

DirectoryIterator

DirectoryIterator(
    const File & file
);

Creates a directory iterator for the given file.

DirectoryIterator

DirectoryIterator(
    const Path & path
);

Creates a directory iterator for the given path.

Destructor

~DirectoryIterator

~DirectoryIterator();

Destroys the DirectoryIterator.

Member Functions

name inline

const std::string & name() const;

Returns the current filename.

operator inline

bool operator == (
    const DirectoryIterator & iterator
) const;

operator != inline

bool operator != (
    const DirectoryIterator & iterator
) const;

operator * inline

const File & operator * () const;

operator *

File & operator * ();

operator ++

DirectoryIterator & operator ++ ();

operator ++

DirectoryIterator operator ++ (
    int
);

Deprecated. This function is deprecated and should no longer be used.

Please use the prefix increment operator instead.

operator =

DirectoryIterator & operator = (
    const DirectoryIterator & it
);

operator =

DirectoryIterator & operator = (
    const File & file
);

operator =

DirectoryIterator & operator = (
    const Path & path
);

operator =

DirectoryIterator & operator = (
    const std::string & path
);

operator-> inline

const File * operator-> () const;

operator->

File * operator-> ();

path inline

const Path & path() const;

Returns the current path.