Crashpad
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Loading...
Searching...
No Matches
crashpad::DirectoryReader Class Reference

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

#include "util/file/directory_reader.h"

Public Types

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

Public Member Functions

 DirectoryReader (const DirectoryReader &)=delete
 
DirectoryReaderoperator= (const DirectoryReader &)=delete
 
bool Open (const base::FilePath &path)
 Opens the directory specified by path for reading.
 
Result NextFile (base::FilePath *filename)
 Advances the reader to the next file in the directory.
 
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

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]filenameThe 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]pathThe 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: