#include <DirectoryScanner.H>
|
| static std::string | getHomeDir () |
| |
| static int | mkDir (const std::string &pathname, mode_t mode) |
| |
Scan a directory for contents, either directories or other files. The found names are in the inherited std::vector of std::strings.
- Examples:
- DirectoryScannerTest.C.
Definition at line 63 of file DirectoryScanner.H.
◆ DirectoryScanner() [1/2]
| DirectoryScanner::DirectoryScanner |
( |
| ) |
|
|
inline |
◆ DirectoryScanner() [2/2]
| DirectoryScanner::DirectoryScanner |
( |
std::string |
path | ) |
|
|
inline |
Can the directory at path. The directoryItems are filled.
- Parameters
-
| path | The path to scan for files/directories |
Definition at line 76 of file DirectoryScanner.H.
◆ ~DirectoryScanner()
| virtual DirectoryScanner::~DirectoryScanner |
( |
| ) |
|
|
inlinevirtual |
◆ close()
| int DirectoryScanner::close |
( |
void |
| ) |
|
|
inline |
Close the directory
- Returns
- NO_ERROR or the appropriate error on failure.
Definition at line 104 of file DirectoryScanner.H.
◆ findAll()
| int DirectoryScanner::findAll |
( |
const std::vector< std::string > & |
dontInclude | ) |
|
|
inline |
The directoryItems are filled in the directory represented by path.
- Parameters
-
| dontInclude | The directories or files not to include |
- Returns
- NO_ERROR or the appropriate error on failure.
- Examples:
- DirectoryScannerTest.C.
Definition at line 119 of file DirectoryScanner.H.
◆ getHomeDir()
| static std::string DirectoryScanner::getHomeDir |
( |
| ) |
|
|
inlinestatic |
Get the user's home directory
- Returns
- The user's home directory if successful, empty string otherwise
Definition at line 170 of file DirectoryScanner.H.
◆ getPath()
| std::string DirectoryScanner::getPath |
( |
| ) |
|
|
inline |
◆ keepWithPattern()
| void DirectoryScanner::keepWithPattern |
( |
const std::string |
pattern | ) |
|
|
inline |
Keep any item which has pattern in the path/name.
- Parameters
-
| pattern | The pattern to find in the path/name |
Definition at line 153 of file DirectoryScanner.H.
◆ mkDir()
| static int DirectoryScanner::mkDir |
( |
const std::string & |
pathname, |
|
|
mode_t |
mode |
|
) |
| |
|
inlinestatic |
Make a directory.
- Parameters
-
| pathname | The directory to make |
Definition at line 182 of file DirectoryScanner.H.
◆ open()
| int DirectoryScanner::open |
( |
std::string |
path | ) |
|
|
inline |
Open the directory at path.
- Parameters
-
| path | The path to scan for files/directories |
- Returns
- NO_ERROR or the appropriate error on failure.
Definition at line 90 of file DirectoryScanner.H.
◆ dir
| DIR* DirectoryScanner::dir |
|
private |
◆ path
| std::string DirectoryScanner::path |
|
private |
The documentation for this class was generated from the following file: