MySQL 8.0.39
Source Code Documentation
filesystem-windows.cc File Reference
#include "mysql/harness/filesystem.h"
#include <direct.h>
#include <shlwapi.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <windows.h>
#include <array>
#include <cassert>
#include <cerrno>
#include <fstream>
#include <memory>
#include <random>
#include <sstream>
#include <stdexcept>
#include <string>
#include <system_error>
#include "mysql/harness/access_rights.h"
#include "mysql/harness/stdx/expected.h"

Classes

class  mysql_harness::Directory::DirectoryIterator::State
 

Namespaces

namespace  anonymous_namespace{filesystem-windows.cc}
 
namespace  mysql_harness
 

Functions

const std::string anonymous_namespace{filesystem-windows.cc}::extsep (".")
 
HARNESS_EXPORT stdx::expected< void, std::error_code > mysql_harness::delete_dir (const std::string &dir) noexcept
 Removes a directory. More...
 
HARNESS_EXPORT stdx::expected< void, std::error_code > mysql_harness::delete_file (const std::string &path) noexcept
 Removes a file. More...
 
HARNESS_EXPORT std::string mysql_harness::get_tmp_dir (const std::string &name="router")
 Creates a temporary directory with partially-random name and returns its path. More...
 
int mysql_harness::mkdir_wrapper (const std::string &dir, perm_mode mode)
 
static stdx::expected< void, std::error_code > mysql_harness::make_file_private_win32 (const std::string &filename, const bool read_only_for_local_service)
 Makes a file fully accessible by the current process user and (read only or read/write depending on the second argument) for LocalService account (which is the account under which the MySQL router runs as service). More...
 
static stdx::expected< void, std::error_code > mysql_harness::set_everyone_group_access_rights (const std::string &file_name, DWORD mask)
 Sets file permissions for Everyone group. More...
 
void HARNESS_EXPORT mysql_harness::make_file_public (const std::string &file_name)
 Changes file access permissions to be fully accessible by all users. More...
 
void HARNESS_EXPORT mysql_harness::make_file_private (const std::string &file_name, const bool read_only_for_local_service=true)
 Changes file access permissions to be accessible only by a limited set of users. More...
 
void mysql_harness::make_file_readable_for_everyone (const std::string &file_name)
 
void HARNESS_EXPORT mysql_harness::make_file_readonly (const std::string &file_name)
 Changes file access permissions to be read only. More...