26#ifndef MYSQL_HARNESS_AUTO_CLEANER_INCLUDED 
   27#define MYSQL_HARNESS_AUTO_CLEANER_INCLUDED 
   34#include "harness_export.h" 
   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 & operator=(const AutoCleaner &)=delete
std::vector< std::function< void()> > callbacks_
Definition: auto_cleaner.h:97
std::vector< std::pair< std::string, std::pair< Type, std::string > > > files_
Definition: auto_cleaner.h:91
AutoCleaner(AutoCleaner &&other) noexcept=default
Type
Definition: auto_cleaner.h:83
@ Directory
Definition: auto_cleaner.h:83
AutoCleaner(const AutoCleaner &)=delete
AutoCleaner & operator=(AutoCleaner &&other)=default
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:137
static mysql_service_status_t clear(reference_caching_channel channel) noexcept
Definition: component.cc:146
std::vector< T, ut::allocator< T > > vector
Specialization of vector which uses allocator.
Definition: ut0new.h:2880