[#BloombergLP-bdls-FilesystemUtil-createTemporaryFile-02]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdls.adoc[bdls]::xref:BloombergLP/bdls/FilesystemUtil.adoc[FilesystemUtil]::createTemporaryFile
:relfileprefix: ../../../
:mrdocs:

Create and open a new temporary file with a name based on `prefix`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdls/FilesystemUtil/FileDescriptor.adoc[FileDescriptor]
createTemporaryFile(
    std::pmr::string* outPath,
    std::string&lowbar;view const& prefix);
----

== Description

Same as the overload taking `bsl&colon;&colon;string &ast;`, using `std&colon;&colon;pmr&colon;&colon;string`&period;

== Return Value

a valid `FileDescriptor` on success, or `k&lowbar;INVALID&lowbar;FD` otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *outPath*
| receives the path of the created file
| *prefix*
| prefix of the generated file name
|===


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