[#BloombergLP-bdls-FilesystemUtil-createDirectories-04] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdls.adoc[bdls]::xref:BloombergLP/bdls/FilesystemUtil.adoc[FilesystemUtil]::createDirectories :relfileprefix: ../../../ :mrdocs: `createDirectories` overloads == Synopses Declared in `<bdls_filesystemutil.h>` Create any directories in the specified `path` that do not exist. If the optionally specified `isLeafDirectoryFlag` is `true`, treat the final name component in `path` as a directory name, and create it. Otherwise, create only the directories leading up to the final name component. Return 0 on success, `k_ERROR_PATH_NOT_FOUND` if a component used as a directory in `path` exists but is not a directory, and a negative value for any other kind of error. The parameterized `STRING_TYPE` must be one of `bsl::string`, `std::string`, `std::pmr::string` (if supported), `bsl::string_view`, or `bslstl::StringRef`. [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..._]# Same as the overload taking `const char *`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class STRING_TYPE> static int xref:BloombergLP/bdls/FilesystemUtil/createDirectories-03.adoc[createDirectories]( STRING_TYPE const& path, bool isLeafDirectoryFlag = false); ---- [.small]#xref:BloombergLP/bdls/FilesystemUtil/createDirectories-03.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#