Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::runtime::TemporaryFile Class Reference

#include <temporary_file.hpp>

Public Member Functions

 TemporaryFile (std::string_view extension="")
 Create a temporary file with optional extension (e.g., ".wav").
 ~TemporaryFile ()
const std::filesystem::path & path () const
 Full path to the temporary file.
std::string path_string () const
 String version of the path.
void release ()
 Prevent auto-deletion (e.g., if you want to keep the file).
 TemporaryFile (const TemporaryFile &)=delete
TemporaryFile & operator= (const TemporaryFile &)=delete
 TemporaryFile (TemporaryFile &&other) noexcept
TemporaryFile & operator= (TemporaryFile &&other) noexcept

Static Public Member Functions

static bool create_exclusive (const std::filesystem::path &path)
 Create path as an empty file readable and writable by the owner only.

Constructor & Destructor Documentation

◆ TemporaryFile() [1/3]

pulp::runtime::TemporaryFile::TemporaryFile ( std::string_view extension = "")
explicit

Create a temporary file with optional extension (e.g., ".wav").

◆ ~TemporaryFile()

pulp::runtime::TemporaryFile::~TemporaryFile ( )

◆ TemporaryFile() [2/3]

pulp::runtime::TemporaryFile::TemporaryFile ( const TemporaryFile & )
delete

◆ TemporaryFile() [3/3]

pulp::runtime::TemporaryFile::TemporaryFile ( TemporaryFile && other)
noexcept

Member Function Documentation

◆ create_exclusive()

bool pulp::runtime::TemporaryFile::create_exclusive ( const std::filesystem::path & path)
static

Create path as an empty file readable and writable by the owner only.

Fails without touching the file when path already exists.

◆ operator=() [1/2]

TemporaryFile & pulp::runtime::TemporaryFile::operator= ( const TemporaryFile & )
delete

◆ operator=() [2/2]

TemporaryFile & pulp::runtime::TemporaryFile::operator= ( TemporaryFile && other)
noexcept

◆ path()

const std::filesystem::path & pulp::runtime::TemporaryFile::path ( ) const
inline

Full path to the temporary file.

◆ path_string()

std::string pulp::runtime::TemporaryFile::path_string ( ) const
inline

String version of the path.

◆ release()

void pulp::runtime::TemporaryFile::release ( )
inline

Prevent auto-deletion (e.g., if you want to keep the file).


The documentation for this class was generated from the following file: