[#BloombergLP-bdls-FilesystemUtil-createDirectories-04]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdls.adoc[bdls]::xref:BloombergLP/bdls/FilesystemUtil.adoc[FilesystemUtil]::createDirectories
:relfileprefix: ../../../
:mrdocs:

Create any directories in the specified `path` that do not exist&period;

== Synopses

Declared in `&lt;bdls&lowbar;filesystemutil&period;h&gt;`

Create any directories in the specified `path` that do not exist&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdls/FilesystemUtil/createDirectories-00.adoc[createDirectories](
    char const* path,
    bool isLeafDirectoryFlag = false);
----

[.small]#xref:BloombergLP/bdls/FilesystemUtil/createDirectories-00.adoc[_» more&period;&period;&period;_]#

Create any directories in the specified `path` that do not exist&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class STRING&lowbar;TYPE&gt;
static
int
xref:BloombergLP/bdls/FilesystemUtil/createDirectories-03.adoc[createDirectories](
    STRING&lowbar;TYPE const& path,
    bool isLeafDirectoryFlag = false);
----

[.small]#xref:BloombergLP/bdls/FilesystemUtil/createDirectories-03.adoc[_» more&period;&period;&period;_]#

== Return Value

0 on success, `k&lowbar;ERROR&lowbar;PATH&lowbar;NOT&lowbar;FOUND` if a path component exists but is not a directory, and a negative value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *path*
| filesystem path whose missing directories are created
| *isLeafDirectoryFlag*
| whether to treat the final component as a directory and create it
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
