[#BloombergLP-bdls-FilesystemUtil-makeUnsafeTemporaryFilename-09] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdls.adoc[bdls]::xref:BloombergLP/bdls/FilesystemUtil.adoc[FilesystemUtil]::makeUnsafeTemporaryFilename :relfileprefix: ../../../ :mrdocs: `makeUnsafeTemporaryFilename` overloads == Synopses Declared in `<bdls_filesystemutil.h>` Construct a file name by appending an automatically‐generated suffix to the specified `prefix`. The file name constructed is assigned to the specified `outPath`. Note that this function is called "unsafe" because a file with the resulting name may be created by another program before the caller has opportunity to use the name, which could be a security vulnerability, and a file with the given name may already exist where you mean to put it. Note that the suffix is hashed from environmental details, including any pre‐existing value of `outPath` so that if a resulting name is unsuitable (e.g. the file exists) this function may simply be called again, pointing to its previous result, to get a new, probably different name. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static void xref:BloombergLP/bdls/FilesystemUtil/makeUnsafeTemporaryFilename-00.adoc[makeUnsafeTemporaryFilename]( xref:bsl/string.adoc[bsl::string]* outPath, std::string_view const& prefix); ---- [.small]#xref:BloombergLP/bdls/FilesystemUtil/makeUnsafeTemporaryFilename-00.adoc[_» more..._]# Same as the overload taking `bsl::string *`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static void xref:BloombergLP/bdls/FilesystemUtil/makeUnsafeTemporaryFilename-0c.adoc[makeUnsafeTemporaryFilename]( std::pmr::string* outPath, std::string_view const& prefix); ---- [.small]#xref:BloombergLP/bdls/FilesystemUtil/makeUnsafeTemporaryFilename-0c.adoc[_» more..._]# Same as the overload taking `bsl::string *`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static void xref:BloombergLP/bdls/FilesystemUtil/makeUnsafeTemporaryFilename-0e.adoc[makeUnsafeTemporaryFilename]( std::string* outPath, std::string_view const& prefix); ---- [.small]#xref:BloombergLP/bdls/FilesystemUtil/makeUnsafeTemporaryFilename-0e.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#