MySQL 9.3.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
utils_path.h File Reference
#include <string>
#include <tuple>
#include <utility>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  shcore
 
namespace  shcore::path
 
namespace  shcore::path::detail
 

Functions

std::string shcore::path::detail::expand_user (const std::string &path, const std::string &sep)
 
std::tuple< std::string, std::string > shcore::path::detail::split_extension (const std::string &path, const std::string &sep)
 
size_t shcore::path::detail::span_dirname (const std::string &path)
 
std::string shcore::path::join_path (const std::vector< std::string > &components)
 
std::string shcore::path::join_path (const std::string &a, const std::string &b)
 
template<typename... Args>
std::string shcore::path::join_path (const std::string &a, const std::string &b, Args... args)
 
std::pair< std::string, std::string > shcore::path::splitdrive (const std::string &path)
 
std::string shcore::path::dirname (const std::string &path)
 
std::string shcore::path::basename (const std::string &path)
 
std::string shcore::path::home ()
 Get home directory path of the user executing the shell. More...
 
std::string shcore::path::home (const std::string &loginname)
 Get home directory path of user associated with the specified login name. More...
 
std::string shcore::path::expand_user (const std::string &path)
 expand_user expand paths beginning with ~ or ~user (also known as "tilde expansion"). More...
 
std::string shcore::path::normalize (const std::string &path)
 Unix: Normalize a path collapsing redundant separators and relative references. More...
 
std::tuple< std::string, std::string > shcore::path::split_extension (const std::string &path)
 Split path to (root, extension) tuple such that [root + extenstion == path]. More...
 
bool shcore::path::exists (const std::string &path)
 Returns true if the path exists. More...
 
std::string shcore::path::search_stdpath (const std::string &name)
 Returns path to the given executable name searched in PATH. More...
 
std::string shcore::path::search_path_list (const std::string &name, const std::string &pathlist, const char separator=0)
 Returns path to the given executable name searched in the given path list string, separated by the given separator. More...
 
bool shcore::path::is_path_separator (char c)
 Checks if character is a path separator. More...
 
bool shcore::path::is_absolute (const std::string &path)
 Checks if path is absolute. More...
 
std::string shcore::path::getcwd ()
 Provides path to the current working directory. More...
 

Variables

const char shcore::path::path_separator = '/'
 
const char shcore::path::pathlist_separator = ':'
 
const char shcore::path::pathlist_separator_s [] = {pathlist_separator, '\0'}
 
const char * shcore::path::k_valid_path_separators = "/"