crashpad::DirectoryReader Class Reference

Iterates over the file and directory names in a directory. More...

`#include "util/file/directory_reader.h"`

## Public Types

enum | Result
| The result of a call to NextFile(). More...

## Public Member Functions

bool | Open (const base::FilePath &path)
| Opens the directory specified by path for reading. More...
Result | NextFile (base::FilePath *filename)
| Advances the reader to the next file in the directory. More...
int | DirectoryFD ()
| Returns the file descriptor associated with this reader, logging a message and returning -1 on error.

## Detailed Description

Iterates over the file and directory names in a directory.

The names enumerated are relative to the specified directory and do not include ".", "..", or files and directories in subdirectories.

## Member Enumeration Documentation

## Result

enum crashpad::DirectoryReader::Result

strong

The result of a call to NextFile().

Enumerator
kError | An error occurred and a message was logged.
kSuccess | A file was found.
kNoMoreFiles | No more files were found.

## Member Function Documentation

## NextFile()

DirectoryReader::Result crashpad::DirectoryReader::NextFile | ( | base::FilePath * | filename | ) |

Advances the reader to the next file in the directory.

Parameters

  [out] | filename | The filename of the next file.

Returns
  a Result value. filename is only valid when Result::kSuccess is returned. If Result::kError is returned, a message will be logged.

## Open()

bool crashpad::DirectoryReader::Open | ( | const base::FilePath & | path | ) |

Opens the directory specified by path for reading.

Parameters

  [in] | path | The path to the directory to read.

Returns
  `true` on success. `false` on failure with a message logged.

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

- util/file/directory_reader.h
- util/file/directory_reader_posix.cc
- util/file/directory_reader_win.cc