pstore2
Namespaces | Functions
pstore::path Namespace Reference

The 'path' namespace contains all of the functions that are used to manipulated host file paths. More...

Namespaces

 posix
 POSIX-specific path name handling.
 
 win32
 Win32-specific path name handling.
 

Functions

std::pair< std::string, std::string > split_drive (std::string const &path)
 
std::string base_name (std::string const &path)
 
std::string dir_name (std::string const &path)
 
Path joining functions

Join one or more path components intelligently.

The return value is the concatenation of path and any members of *paths with exactly one directory separator following each non-empty part except the last, meaning that the result will only end in a separator if the last part is empty. If a component is an absolute path, all previous components are thrown away and joining continues from the absolute path component.

On Windows, the drive letter is not reset when an absolute path component (e.g., "\\foo") is encountered. If a component contains a drive letter, all previous components

std::string join (std::string const &path, std::initializer_list< std::string > const &paths)
 
std::string join (std::string const &path, std::string const &b)
 

Detailed Description

The 'path' namespace contains all of the functions that are used to manipulated host file paths.