BloombergLP::bdls::FilesystemUtil::createDirectories

Create any directories in the specified path that do not exist.

Synopsis

Declared in <bdls_filesystemutil.h>

template<class STRING_TYPE>
static
int
createDirectories(
    STRING_TYPE const& path,
    bool isLeafDirectoryFlag = false);

Description

Same as the overload taking const char *.

Return Value

0 on success, k_ERROR_PATH_NOT_FOUND if a path component exists but is not a directory, and a negative value otherwise

Parameters

NameDescription
pathfilesystem path whose missing directories are created
isLeafDirectoryFlagwhether to treat the final component as a directory and create it