|
OXY API 1.0
OXY API Library Documentation
|
Function object to create a unique temporary file path with a specified extension. More...
#include <tmpfile.hpp>
Public Member Functions | |
| auto | operator() (std::string const &extension="tmp") const |
| Generates a unique temporary file path with a specified extension. | |
Function object to create a unique temporary file path with a specified extension.
This functor generates a unique temporary file path in the system's temporary directory with the specified extension. It uses a UUID to ensure uniqueness and returns a unique_ptr managing the temporary file path. The temporary file will be automatically removed when the unique_ptr goes out of scope.
|
inline |
Generates a unique temporary file path with a specified extension.
| extension | The file extension to use for the temporary file. Defaults to "tmp". |
References oxy::make_unique_path(), oxy::make_uuid(), and oxy::to_string().