BloombergLP::bdls::FilesystemUtil::createTemporaryFile

Create and open a new temporary file with a name based on prefix.

Synopses

Declared in <bdls_filesystemutil.h>

Create and open a new temporary file with a name based on prefix.

static
FileDescriptor
createTemporaryFile(
    bsl::string* outPath,
    std::string_view const& prefix);
» more...

Create and open a new temporary file with a name based on prefix.

static
FileDescriptor
createTemporaryFile(
    std::pmr::string* outPath,
    std::string_view const& prefix);
» more...

Create and open a new temporary file with a name based on prefix.

static
FileDescriptor
createTemporaryFile(
    std::string* outPath,
    std::string_view const& prefix);
» more...

Return Value

a valid FileDescriptor on success, or k_INVALID_FD otherwise

Parameters

NameDescription
outPathreceives the path of the created file
prefixprefix of the generated file name