26#ifndef ROUTER_AUTO_CLEANER_INCLUDED
27#define ROUTER_AUTO_CLEANER_INCLUDED
64 void add_file_delete(
const std::string &
file);
65 void add_directory_delete(
const std::string &d,
bool recursive =
false);
66 void add_file_revert(
const std::string &
file);
67 void add_file_revert(
const std::string &
file,
const std::string &backup_file);
68 void add_cleanup_callback(std::function<
void()> callback)
noexcept;
69 void clear_cleanup_callbacks()
noexcept;
91 std::vector<std::pair<std::string, std::pair<Type, std::string>>>
files_;
Automatic cleanup on scope exit utility class.
Definition: auto_cleaner.h:62
AutoCleaner(AutoCleaner &&other) noexcept=default
Type
Definition: auto_cleaner.h:83
@ Directory
Definition: auto_cleaner.h:83
AutoCleaner & operator=(const AutoCleaner &)=delete
AutoCleaner(const AutoCleaner &)=delete
AutoCleaner & operator=(AutoCleaner &&other)=default
std::vector< std::pair< std::string, std::pair< Type, std::string > > > files_
Definition: auto_cleaner.h:91
std::vector< std::function< void()> > callbacks_
Definition: auto_cleaner.h:97
int File
Definition: my_io_bits.h:51
static mysql_service_status_t remove(reference_caching_channel channel, const char *implementation_name) noexcept
Definition: component.cc:145
static mysql_service_status_t clear(reference_caching_channel channel) noexcept
Definition: component.cc:154
std::vector< T, ut::allocator< T > > vector
Specialization of vector which uses allocator.
Definition: ut0new.h:2875
#define ROUTER_LIB_EXPORT
Definition: router_export.h:15