pstore2
Namespaces | Macros | Functions
path.hpp File Reference

Functions to operate on native file paths. More...

#include <initializer_list>
#include <string>
#include <utility>
Include dependency graph for path.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 pstore::path
 The 'path' namespace contains all of the functions that are used to manipulated host file paths.
 
 pstore::path::posix
 POSIX-specific path name handling.
 
 pstore::path::win32
 Win32-specific path name handling.
 

Macros

#define PSTORE_PLATFORM_NS   posix
 

Functions

std::pair< std::string, std::string > pstore::path::posix::split_drive (std::string const &path)
 
std::string pstore::path::posix::dir_name (std::string const &path)
 
std::string pstore::path::posix::base_name (std::string const &path)
 
std::string pstore::path::posix::join (std::string const &path, std::initializer_list< std::string > const &paths)
 
std::string pstore::path::posix::join (std::string const &path, std::string const &b)
 
std::pair< std::string, std::string > pstore::path::win32::split_drive (std::string const &path)
 
std::string pstore::path::win32::dir_name (std::string const &path)
 
std::string pstore::path::win32::base_name (std::string const &path)
 
std::string pstore::path::win32::join (std::string const &path, std::initializer_list< std::string > const &paths)
 
std::string pstore::path::win32::join (std::string const &path, std::string const &b)
 
std::pair< std::string, std::string > pstore::path::split_drive (std::string const &path)
 
std::string pstore::path::base_name (std::string const &path)
 
std::string pstore::path::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 pstore::path::join (std::string const &path, std::initializer_list< std::string > const &paths)
 
std::string pstore::path::join (std::string const &path, std::string const &b)
 

Detailed Description

Functions to operate on native file paths.