MySQL 9.1.0
Source Code Documentation
default_paths.cc File Reference
#include <array>
#include <cstring>
#include <initializer_list>
#include <map>
#include <string>
#include "mysql/harness/filesystem.h"
#include "mysql/harness/supported_config_options.h"
#include "mysqlrouter/default_paths.h"
#include "mysqlrouter/supported_router_options.h"
#include "mysqlrouter/utils.h"
#include "router_config.h"
#include <unistd.h>

Namespaces

namespace  mysqlrouter
 

Functions

static std::string ensure_absolute_path (const std::string &path, const std::string &basedir)
 Returns <path> if it is absolute[*], <basedir>/<path> otherwise. More...
 
std::map< std::string, std::string > ROUTER_UTILS_EXPORT mysqlrouter::get_default_paths (const mysql_harness::Path &origin)
 Returns predefined (computed) default paths. More...
 
std::string ROUTER_UTILS_EXPORT mysqlrouter::find_full_executable_path (const std::string &argv0)
 Returns absolute path to mysqlrouter.exe currently running. More...
 

Variables

const char dir_sep = '/'
 
const std::string path_sep = ":"
 
static const char kProgramName [] = "mysqlrouter"
 

Function Documentation

◆ ensure_absolute_path()

static std::string ensure_absolute_path ( const std::string &  path,
const std::string &  basedir 
)
static

Returns <path> if it is absolute[*], <basedir>/<path> otherwise.

[*] <path> is considered absolute if it starts with one of: Unix: '/' Windows: '/' or '\' or '.:' (where . is any character) both: '{origin}' or 'ENV{' else: it's considered relative (empty <path> is also relative in such respect)

Parameters
pathAbsolute or relative path; absolute path may start with '{origin}' or 'ENV{'
basedirPath to grandparent directory of mysqlrouter.exe, i.e. for '/path/to/bin/mysqlrouter.exe/' it will be '/path/to'

Variable Documentation

◆ dir_sep

const char dir_sep = '/'

◆ kProgramName

const char kProgramName[] = "mysqlrouter"
static

◆ path_sep

const std::string path_sep = ":"