[#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`&period; Return 0 on success, `k&lowbar;ERROR&lowbar;PATH&lowbar;NOT&lowbar;FOUND` if a component used as a directory in `path` either does not exist or is not a directory, `k&lowbar;ERROR&lowbar;ALREADY&lowbar;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&period; The directory is created with permissions restricting access, as closely as possible, to the caller&apos;s userid only&period; Note that directories created on Microsoft Windows may receive default, not restricted permissions&period; The parameterized `STRING&lowbar;TYPE` must be one of `bsl&colon;&colon;string`, `std&colon;&colon;string`, `std&colon;&colon;pmr&colon;&colon;string` (if supported), `bsl&colon;&colon;string&lowbar;view`, or `bslstl&colon;&colon;StringRef`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
createPrivateDirectory(char const* path);
----


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