OpenMPCD
Static Public Member Functions | List of all members
OpenMPCD::FilesystemUtilities Class Reference

Provides utility functions for filesystem access. More...

#include <FilesystemUtilities.hpp>

Static Public Member Functions

static void ensureDirectory (const std::string &path)
 Ensures that the given directory exists, creating it and its parents if necessary. More...
 
static void ensureParentDirectory (const std::string &path)
 Ensures that the parent directory of the path given exists. More...
 

Detailed Description

Provides utility functions for filesystem access.

Definition at line 16 of file FilesystemUtilities.hpp.

Member Function Documentation

◆ ensureDirectory()

void FilesystemUtilities::ensureDirectory ( const std::string &  path)
static

Ensures that the given directory exists, creating it and its parents if necessary.

Exceptions
IOExceptionThrows on failure.
Parameters
[in]pathThe directory's path.

Definition at line 9 of file FilesystemUtilities.cpp.

◆ ensureParentDirectory()

void FilesystemUtilities::ensureParentDirectory ( const std::string &  path)
static

Ensures that the parent directory of the path given exists.

If the path given has no parent, nothing is done.

Exceptions
IOExceptionThrows on failure.
Parameters
[in]pathThe path in question.

Definition at line 18 of file FilesystemUtilities.cpp.


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