fennec
Loading...
Searching...
No Matches
fennec::path

struct for handling file paths More...

#include <path.h>

Detailed Description

This structure makes no guarantees about the validity of a path. Operations do not examine the system's file structure.

Public Member Functions

 path ()
 Default Constructor, returns the root of the current working directory.
 
 path (const cstring &str)
 C-String Conversion Constructor.
 
 path (const string &str)
 String Conversion Constructor.
 
 path (const path &p)
 Path Copy Constructor.
 
 path (path &&p) noexcept
 Path Move Constructor.
 
template<size_t n>
pathoperator= (const char(&str)[n])
 C-String Assignment Operator.
 
pathoperator= (const cstring &p)
 C-String Assignment Operator.
 
pathoperator= (const string &p)
 String Assignment Operator.
 
pathoperator= (const path &p)
 Path Copy Assignment Operator.
 
pathoperator= (path &&p) noexcept
 Path Move Assignment Operator.
 
path operator/ (const cstring &str) const
 

Static Public Member Functions

static path current ()
 Get the current working directory.
 
static path current (const path &path)
 Set the current working directory.
 

Constructor & Destructor Documentation

◆ path() [1/4]

fennec::path::path ( const cstring str)
inline
Parameters
strthe cstring to convert

◆ path() [2/4]

fennec::path::path ( const string str)
inline
Parameters
strthe string to convert

◆ path() [3/4]

fennec::path::path ( const path p)
inline
Parameters
pthe path to copy

◆ path() [4/4]

fennec::path::path ( path &&  p)
inlinenoexcept
Parameters
pthe path to take ownership of

Member Function Documentation

◆ current() [1/2]

path fennec::path::current ( )
static
Returns
a path containing the absolute path to the working directory

◆ current() [2/2]

path fennec::path::current ( const path path)
static
Parameters
paththe path to the new working directory
Returns
a path containing the absolute path to the working directory

◆ operator=() [1/5]

template<size_t n>
path & fennec::path::operator= ( const char(&)  str[n])
inline
Parameters
strthe cstring to assign
Returns
a reference to this after assigning p

◆ operator=() [2/5]

path & fennec::path::operator= ( const cstring p)
inline
Parameters
pthe cstring to assign
Returns
a reference to this after assigning p

◆ operator=() [3/5]

path & fennec::path::operator= ( const string p)
inline
Parameters
pthe cstring to assign
Returns
a reference to this after assigning p

◆ operator=() [4/5]

path & fennec::path::operator= ( const path p)
inline
Parameters
pthe path to copy
Returns
a reference to this after copying p

◆ operator=() [5/5]

path & fennec::path::operator= ( path &&  p)
inlinenoexcept
Parameters
pthe path to take ownership of
Returns
a reference to this after taking ownership of p

◆ operator/()

path fennec::path::operator/ ( const cstring str) const
inline
Parameters
str
Returns

The documentation for this struct was generated from the following files: