OXY API 1.0
OXY API Library Documentation
Loading...
Searching...
No Matches
oxy::PathRemover Struct Reference

Custom deleter for std::filesystem::path that removes the file or directory when the unique_ptr goes out of scope. More...

#include <tmpfile.hpp>

Public Member Functions

void operator() (std::filesystem::path *path) const noexcept
 Deletes the path and removes the file or directory if it exists.

Detailed Description

Custom deleter for std::filesystem::path that removes the file or directory when the unique_ptr goes out of scope.

Member Function Documentation

◆ operator()()

void oxy::PathRemover::operator() ( std::filesystem::path * path) const
inlinenoexcept

Deletes the path and removes the file or directory if it exists.

Parameters
pathPointer to the std::filesystem::path to be deleted.