# ACE_Dirent_Selector Class Reference

Define a portable C++ directory-entry iterator based on the POSIX scandir API. More...

`#include <Dirent_Selector.h>`

List of all members.

## Public Member Functions

| ACE_Dirent_Selector (void)
| Constructor.
virtual | ~ACE_Dirent_Selector (void)
| Destructor.
int | length (void) const
| Return the length of the list of matching directory entries.
ACE_DIRENT * | operator[] (const int index) const
| Return the entry at index.
int | close (void)
| Free up resources.
int | open (const ACE_TCHAR *dir, int(*selector)(const ACE_DIRENT *d)=0, int(*comparator)(const ACE_DIRENT **d1, const ACE_DIRENT **d2)=0)

## Protected Attributes

ACE_DIRENT ** | namelist_
| Ptr to the namelist array.
int | n_
| Number of entries in the array.

## Detailed Description

Define a portable C++ directory-entry iterator based on the POSIX scandir API.

## Constructor & Destructor Documentation

ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_Dirent_Selector::ACE_Dirent_Selector | ( | void |  | ) |

| Constructor.

ACE_Dirent_Selector::~ACE_Dirent_Selector | ( | void |  | ) | `[virtual]`

| Destructor.

## Member Function Documentation

int ACE_Dirent_Selector::close | ( | void |  | ) |

| Free up resources.

ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE int ACE_Dirent_Selector::length | ( | void |  | ) | const

| Return the length of the list of matching directory entries.

int ACE_Dirent_Selector::open | ( | const ACE_TCHAR * | dir,
|  | int(*)(const ACE_DIRENT *d) | selector = `0`,
|  | int(*)(const ACE_DIRENT **d1, const ACE_DIRENT **d2) | comparator = `0`
| ) |

| Open the directory dir and populate the <namelist_> array with directory entries that match the selector and comparator.

ACE_INLINE ACE_DIRENT * ACE_Dirent_Selector::operator[] | ( | const int | index | ) | const

| Return the entry at index.

## Member Data Documentation

int ACE_Dirent_Selector::n_ `[protected]`

| Number of entries in the array.

ACE_DIRENT** ACE_Dirent_Selector::namelist_ `[protected]`

| Ptr to the namelist array.

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

- Dirent_Selector.h
- Dirent_Selector.cpp
- Dirent_Selector.inl