[#BloombergLP-bdls-FilesystemUtil-createPrivateDirectory-04] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdls.adoc[bdls]::xref:BloombergLP/bdls/FilesystemUtil.adoc[FilesystemUtil]::createPrivateDirectory :relfileprefix: ../../../ :mrdocs: Create a private directory with the specified `path`. Return 0 on success, `k_ERROR_PATH_NOT_FOUND` if a component used as a directory in `path` either does not exist or is not a directory, `k_ERROR_ALREADY_EXISTS` if the file system entry (not necessarily a directory) with the name `path` already exists, and a negative value for any other kind of error. The directory is created with permissions restricting access, as closely as possible, to the caller's userid only. Note that directories created on Microsoft Windows may receive default, not restricted permissions. The parameterized `STRING_TYPE` must be one of `bsl::string`, `std::string`, `std::pmr::string` (if supported), `bsl::string_view`, or `bslstl::StringRef`. == Synopsis Declared in `<bdls_filesystemutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int createPrivateDirectory(char const* path); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#