Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions | Variables
path.cpp File Reference
#include "precompiled.h"
#include "lib/path.h"
#include <cstring>
#include <cerrno>

Go to the source code of this file.

Functions

 STATUS_ADD_DEFINITIONS (pathStatusDefinitions)
 
static bool path_is_dir_sep (wchar_t c)
 
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_tpath_name_only (const wchar_t *path)
 Get the path component of a path. More...
 

Variables

static const StatusDefinition pathStatusDefinitions []
 

Function Documentation

static bool path_is_dir_sep ( wchar_t  c)
static

Definition at line 42 of file path.cpp.

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

Definition at line 51 of file path.cpp.

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>.

Definition at line 85 of file path.cpp.

STATUS_ADD_DEFINITIONS ( pathStatusDefinitions  )

Variable Documentation

const StatusDefinition pathStatusDefinitions[]
static
Initial value:
= {
{ ERR::PATH_CHARACTER_ILLEGAL, L"illegal path character" },
{ ERR::PATH_CHARACTER_UNSAFE, L"unsafe path character" },
{ ERR::PATH_NOT_FOUND, L"path not found" },
{ ERR::PATH_MIXED_SEPARATORS, L"path contains both slash and backslash separators" }
}
const Status PATH_CHARACTER_ILLEGAL
Definition: path.h:48
const Status PATH_CHARACTER_UNSAFE
Definition: path.h:49
const Status PATH_MIXED_SEPARATORS
Definition: path.h:51
const Status PATH_NOT_FOUND
Definition: path.h:50

Definition at line 33 of file path.cpp.