Pyrogenesis  trunk
Classes | Namespaces | Functions | Variables
path.h File Reference
#include "lib/sysdep/os.h"
#include "lib/utf8.h"
#include <algorithm>
#include <cstring>
#include <functional>
Include dependency graph for path.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Path
 
struct  std::hash< Path >
 

Namespaces

 ERR
 

Introduction


 
 std
 

Functions

bool path_is_subpath (const wchar_t *s1, const wchar_t *s2)
 is s2 a subpath of s1, or vice versa? (equal counts as subpath) More...
 
const wchar_t * path_name_only (const wchar_t *path)
 Get the path component of a path. More...
 
static std::wostream & operator<< (std::wostream &s, const Path &path)
 
static std::wistream & operator>> (std::wistream &s, Path &path)
 

Variables

const Status ERR::PATH_CHARACTER_ILLEGAL = -100300
 
const Status ERR::PATH_CHARACTER_UNSAFE = -100301
 
const Status ERR::PATH_NOT_FOUND = -100302
 
const Status ERR::PATH_MIXED_SEPARATORS = -100303
 

Function Documentation

◆ operator<<()

static std::wostream& operator<< ( std::wostream &  s,
const Path path 
)
inlinestatic

◆ operator>>()

static std::wistream& operator>> ( std::wistream &  s,
Path path 
)
inlinestatic

◆ path_is_subpath()

bool path_is_subpath ( const wchar_t *  s1,
const wchar_t *  s2 
)

is s2 a subpath of s1, or vice versa? (equal counts as subpath)

Parameters
s1,s2comparand strings
Returns
bool

◆ path_name_only()

const wchar_t* path_name_only ( const wchar_t *  path)

Get the path component of a path.

Skips over all characters up to the last dir separator, if any.

Parameters
pathInput path.
Returns
pointer to path component within <path>.