My Project
 All Classes Functions Variables Pages
Static Public Member Functions | List of all members
FileSystem Class Reference

File system utilities. More...

#include <FileSystem.h>

Static Public Member Functions

static std::vector< FilegetDirectoryContents (std::string path)
 Get the contents of a directory. More...
 
static void dumpDirectory (std::string path)
 Dump a given directory to the log. More...
 
static bool isDirectory (std::string path)
 Does the path refer to a directory? More...
 
static int mkdir (std::string path)
 Create a directory. More...
 
static std::vector< std::string > pathSplit (std::string path)
 Return the constituent parts of the path. If we imagine a path as composed of parts separated by slashes, then this function returns a vector composed of the parts. For example: More...
 
static int remove (std::string path)
 Remove a file from the file system. More...
 

Detailed Description

File system utilities.

Member Function Documentation

void FileSystem::dumpDirectory ( std::string  path)
static

Dump a given directory to the log.

Parameters
[in]pathThe path to the directory to dump.
Returns
N/A.
std::vector< File > FileSystem::getDirectoryContents ( std::string  path)
static

Get the contents of a directory.

Parameters
[in]pathThe path to the directory.
Returns
A vector of Files in the directory.
bool FileSystem::isDirectory ( std::string  path)
static

Does the path refer to a directory?

Parameters
[in]pathThe path to the directory.
int FileSystem::mkdir ( std::string  path)
static

Create a directory.

Parameters
[in]pathThe directory to create.
Returns
N/A.
std::vector< std::string > FileSystem::pathSplit ( std::string  path)
static

Return the constituent parts of the path. If we imagine a path as composed of parts separated by slashes, then this function returns a vector composed of the parts. For example:

``` /x/y/z ``` will break out to:

``` path[0] = "" path[1] = "x" path[2] = "y" path[3] = "z" ```

Returns
A vector of the constituent parts of the path.
int FileSystem::remove ( std::string  path)
static

Remove a file from the file system.

Parameters
[in]pathThe path to the file to be removed.
Returns
The return code of the underlying call.

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