#include <cached_directory.h>
|
enum | FILTER { NONE,
DIRECTORY,
FILE,
MAX
} |
|
typedef std::vector< Entry * > | Entries |
|
|
bool | open (const std::string &in_path) |
|
bool | open (const std::string &in_path, std::set< std::string > &allowable_exts) |
|
bool | open (const std::string &in_path, std::set< std::string > &allowed_exts, CachedDirectory::FILTER filter) |
|
|
std::string | path |
| Path to the directory.
|
|
int | error |
| Error code stored from various syscalls.
|
|
bool | use_full_path |
|
Entries | entries |
| Entries in the directory.
|
|
A utility class to handle processing the entries/files within a directory.
This class will allow the user to either get a list of the entry names within a given directory.
Definition at line 45 of file cached_directory.h.
drizzled::CachedDirectory::CachedDirectory |
( |
) | |
|
drizzled::CachedDirectory::CachedDirectory |
( |
const std::string & |
in_path) | |
|
Constructor taking full directory path as sole parameter.
- Parameters
-
[in] | Path | to the directory to open |
[in] | File | extensions to allow |
drizzled::CachedDirectory::CachedDirectory |
( |
const std::string & |
in_path, |
|
|
std::set< std::string > & |
allowed_exts |
|
) |
| |
Constructor taking full directory path as sole parameter.
- Parameters
-
[in] | Path | to the directory to open |
[in] | File | extensions to allow |
drizzled::CachedDirectory::~CachedDirectory |
( |
) | |
|
bool drizzled::CachedDirectory::fail |
( |
) | |
const |
|
inline |
const Entries& drizzled::CachedDirectory::getEntries |
( |
) | |
const |
|
inline |
Return the list of entries read from the directory
- Returns
- A vector of strings containing the directory entry names.
Definition at line 124 of file cached_directory.h.
References entries.
int drizzled::CachedDirectory::getError |
( |
) | |
const |
|
inline |
Returns the stored error code of the last action the directory object took (open, read, etc)
Definition at line 105 of file cached_directory.h.
References error.
const char* drizzled::CachedDirectory::getPath |
( |
) | |
const |
|
inline |
bool drizzled::CachedDirectory::open |
( |
const std::string & |
in_path) | |
|
|
private |
Encapsulate the logic to open the directory.
- Parameters
-
[in] | The | path to the directory to open and read |
- Return values
-
bool drizzled::CachedDirectory::open |
( |
const std::string & |
in_path, |
|
|
std::set< std::string > & |
allowable_exts |
|
) |
| |
|
private |
Encapsulate the logic to open the directory with a set of allowed file extensions to filter for.
- Parameters
-
[in] | The | path to the directory to open and read |
[in] | File | extensions to allow |
- Return values
-
The documentation for this class was generated from the following files: