sisi4s
Loading...
Searching...
No Matches
ghc::filesystem::path Class Reference

#include <filesystem.hpp>

Inheritance diagram for ghc::filesystem::path:
Collaboration diagram for ghc::filesystem::path:

Classes

struct  _is_basic_string
 
struct  _is_basic_string< std::basic_string< CharT, std::char_traits< CharT >, std::allocator< CharT > > >
 
struct  _is_basic_string< std::basic_string< CharT, Traits, Alloc > >
 
class  iterator
 

Public Types

enum  format { generic_format , native_format , auto_format }
 The path format in which the constructor argument is given. More...
 
using string_type = std::basic_string< value_type >
 
template<typename T1 , typename T2 = void>
using path_type = typename std::enable_if<!std::is_same< path, T1 >::value, path >::type
 
template<typename T >
using path_from_string = typename std::enable_if< _is_basic_string< T >::value||std::is_same< char const *, typename std::decay< T >::type >::value||std::is_same< char *, typename std::decay< T >::type >::value||std::is_same< char16_t const *, typename std::decay< T >::type >::value||std::is_same< char16_t *, typename std::decay< T >::type >::value||std::is_same< char32_t const *, typename std::decay< T >::type >::value||std::is_same< char32_t *, typename std::decay< T >::type >::value||std::is_same< wchar_t const *, typename std::decay< T >::type >::value||std::is_same< wchar_t *, typename std::decay< T >::type >::value, path >::type
 
template<typename T >
using path_type_EcharT = typename std::enable_if< std::is_same< T, char >::value||std::is_same< T, char16_t >::value||std::is_same< T, char32_t >::value||std::is_same< T, wchar_t >::value, path >::type
 
using const_iterator = iterator
 

Public Member Functions

 path () noexcept
 
 path (const path &p)
 
 path (path &&p) noexcept
 
 path (string_type &&source, format fmt=auto_format)
 
template<class Source , typename = path_from_string<Source>>
 path (const Source &source, format fmt=auto_format)
 
template<class InputIterator >
 path (InputIterator first, InputIterator last, format fmt=auto_format)
 
 ~path ()
 
pathoperator= (const path &p)
 
pathoperator= (path &&p) noexcept
 
pathoperator= (string_type &&source)
 
pathassign (string_type &&source)
 
template<class Source >
pathoperator= (const Source &source)
 
template<class Source >
pathassign (const Source &source)
 
template<class InputIterator >
pathassign (InputIterator first, InputIterator last)
 
pathoperator/= (const path &p)
 
template<class Source >
pathoperator/= (const Source &source)
 
template<class Source >
pathappend (const Source &source)
 
template<class InputIterator >
pathappend (InputIterator first, InputIterator last)
 
pathoperator+= (const path &x)
 
pathoperator+= (const string_type &x)
 
pathoperator+= (const value_type *x)
 
pathoperator+= (value_type x)
 
template<class Source >
path_from_string< Source > & operator+= (const Source &x)
 
template<class EcharT >
path_type_EcharT< EcharT > & operator+= (EcharT x)
 
template<class Source >
pathconcat (const Source &x)
 
template<class InputIterator >
pathconcat (InputIterator first, InputIterator last)
 
void clear () noexcept
 
pathmake_preferred ()
 
pathremove_filename ()
 
pathreplace_filename (const path &replacement)
 
pathreplace_extension (const path &replacement=path())
 
void swap (path &rhs) noexcept
 
const string_typenative () const noexcept
 
const value_typec_str () const noexcept
 
 operator string_type () const
 
template<class EcharT , class traits = std::char_traits<EcharT>, class Allocator = std::allocator<EcharT>>
std::basic_string< EcharT, traits, Allocator > string (const Allocator &a=Allocator()) const
 
std::string string () const
 
std::wstring wstring () const
 
std::string u8string () const
 
std::u16string u16string () const
 
std::u32string u32string () const
 
template<class EcharT , class traits = std::char_traits<EcharT>, class Allocator = std::allocator<EcharT>>
std::basic_string< EcharT, traits, Allocator > generic_string (const Allocator &a=Allocator()) const
 
std::string generic_string () const
 
std::wstring generic_wstring () const
 
std::string generic_u8string () const
 
std::u16string generic_u16string () const
 
std::u32string generic_u32string () const
 
int compare (const path &p) const noexcept
 
int compare (const string_type &s) const
 
int compare (const value_type *s) const
 
path root_name () const
 
path root_directory () const
 
path root_path () const
 
path relative_path () const
 
path parent_path () const
 
path filename () const
 
path stem () const
 
path extension () const
 
bool empty () const noexcept
 
bool has_root_name () const
 
bool has_root_directory () const
 
bool has_root_path () const
 
bool has_relative_path () const
 
bool has_parent_path () const
 
bool has_filename () const
 
bool has_stem () const
 
bool has_extension () const
 
bool is_absolute () const
 
bool is_relative () const
 
path lexically_normal () const
 
path lexically_relative (const path &base) const
 
path lexically_proximate (const path &base) const
 
iterator begin () const
 
iterator end () const
 
template<>
pathassign (const path &source)
 
template<>
pathappend (const path &p)
 

Friends

class directory_iterator
 
void swap (path &lhs, path &rhs) noexcept
 
size_t hash_value (const path &p) noexcept
 
path canonical (const path &p, std::error_code &ec)
 
bool create_directories (const path &p, std::error_code &ec) noexcept
 

Member Typedef Documentation

◆ const_iterator

◆ path_from_string

template<typename T >
using ghc::filesystem::path::path_from_string = typename std::enable_if<_is_basic_string<T>::value || std::is_same<char const*, typename std::decay<T>::type>::value || std::is_same<char*, typename std::decay<T>::type>::value || std::is_same<char16_t const*, typename std::decay<T>::type>::value || std::is_same<char16_t*, typename std::decay<T>::type>::value || std::is_same<char32_t const*, typename std::decay<T>::type>::value || std::is_same<char32_t*, typename std::decay<T>::type>::value || std::is_same<wchar_t const*, typename std::decay<T>::type>::value || std::is_same<wchar_t*, typename std::decay<T>::type>::value, path>::type

◆ path_type

template<typename T1 , typename T2 = void>
using ghc::filesystem::path::path_type = typename std::enable_if<!std::is_same<path, T1>::value, path>::type

◆ path_type_EcharT

template<typename T >
using ghc::filesystem::path::path_type_EcharT = typename std::enable_if<std::is_same<T, char>::value || std::is_same<T, char16_t>::value || std::is_same<T, char32_t>::value || std::is_same<T, wchar_t>::value, path>::type

◆ string_type

using ghc::filesystem::path::string_type = std::basic_string<value_type>

Member Enumeration Documentation

◆ format

The path format in which the constructor argument is given.

Enumerator
generic_format 

The generic format, internally used by ghc::filesystem::path with slashes

native_format 

The format native to the current platform this code is build for

auto_format 

Try to auto-detect the format, fallback to native.

Constructor & Destructor Documentation

◆ path() [1/6]

ghc::filesystem::path::path ( )
inlinenoexcept
Here is the caller graph for this function:

◆ path() [2/6]

ghc::filesystem::path::path ( const path p)
inline

◆ path() [3/6]

ghc::filesystem::path::path ( path &&  p)
inlinenoexcept

◆ path() [4/6]

ghc::filesystem::path::path ( string_type &&  source,
format  fmt = auto_format 
)
inline

◆ path() [5/6]

template<class Source , typename >
ghc::filesystem::path::path ( const Source &  source,
format  fmt = auto_format 
)
inline

◆ path() [6/6]

template<class InputIterator >
ghc::filesystem::path::path ( InputIterator  first,
InputIterator  last,
format  fmt = auto_format 
)
inline

◆ ~path()

ghc::filesystem::path::~path ( )
inline

Member Function Documentation

◆ append() [1/3]

template<>
path & ghc::filesystem::path::append ( const path p)
inline
Here is the call graph for this function:

◆ append() [2/3]

template<class Source >
path & ghc::filesystem::path::append ( const Source &  source)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ append() [3/3]

template<class InputIterator >
path & ghc::filesystem::path::append ( InputIterator  first,
InputIterator  last 
)
inline
Here is the call graph for this function:

◆ assign() [1/4]

template<>
path & ghc::filesystem::path::assign ( const path source)
inline

◆ assign() [2/4]

template<class Source >
path & ghc::filesystem::path::assign ( const Source &  source)
inline
Here is the call graph for this function:

◆ assign() [3/4]

template<class InputIterator >
path & ghc::filesystem::path::assign ( InputIterator  first,
InputIterator  last 
)
inline

◆ assign() [4/4]

path & ghc::filesystem::path::assign ( path::string_type &&  source)
inline
Here is the caller graph for this function:

◆ begin()

path::iterator ghc::filesystem::path::begin ( ) const
inline
Here is the caller graph for this function:

◆ c_str()

const path::value_type * ghc::filesystem::path::c_str ( ) const
inlinenoexcept
Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear()

void ghc::filesystem::path::clear ( )
inlinenoexcept
Here is the caller graph for this function:

◆ compare() [1/3]

int ghc::filesystem::path::compare ( const path p) const
inlinenoexcept
Here is the call graph for this function:
Here is the caller graph for this function:

◆ compare() [2/3]

int ghc::filesystem::path::compare ( const string_type s) const
inline
Here is the call graph for this function:

◆ compare() [3/3]

int ghc::filesystem::path::compare ( const value_type s) const
inline
Here is the call graph for this function:

◆ concat() [1/2]

template<class Source >
path & ghc::filesystem::path::concat ( const Source &  x)
inline
Here is the caller graph for this function:

◆ concat() [2/2]

template<class InputIterator >
path & ghc::filesystem::path::concat ( InputIterator  first,
InputIterator  last 
)
inline

◆ empty()

bool ghc::filesystem::path::empty ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ end()

path::iterator ghc::filesystem::path::end ( ) const
inline
Here is the caller graph for this function:

◆ extension()

path ghc::filesystem::path::extension ( ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ filename()

path ghc::filesystem::path::filename ( ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ generic_string() [1/2]

std::string ghc::filesystem::path::generic_string ( ) const
inline

◆ generic_string() [2/2]

template<class EcharT , class traits , class Allocator >
std::basic_string< EcharT, traits, Allocator > ghc::filesystem::path::generic_string ( const Allocator &  a = Allocator()) const
inline

◆ generic_u16string()

std::u16string ghc::filesystem::path::generic_u16string ( ) const
inline

◆ generic_u32string()

std::u32string ghc::filesystem::path::generic_u32string ( ) const
inline

◆ generic_u8string()

std::string ghc::filesystem::path::generic_u8string ( ) const
inline

◆ generic_wstring()

std::wstring ghc::filesystem::path::generic_wstring ( ) const
inline

◆ has_extension()

bool ghc::filesystem::path::has_extension ( ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_filename()

bool ghc::filesystem::path::has_filename ( ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_parent_path()

bool ghc::filesystem::path::has_parent_path ( ) const
inline
Here is the call graph for this function:

◆ has_relative_path()

bool ghc::filesystem::path::has_relative_path ( ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_root_directory()

bool ghc::filesystem::path::has_root_directory ( ) const
inline
Here is the caller graph for this function:

◆ has_root_name()

bool ghc::filesystem::path::has_root_name ( ) const
inline
Here is the caller graph for this function:

◆ has_root_path()

bool ghc::filesystem::path::has_root_path ( ) const
inline
Here is the call graph for this function:

◆ has_stem()

bool ghc::filesystem::path::has_stem ( ) const
inline
Here is the call graph for this function:

◆ is_absolute()

bool ghc::filesystem::path::is_absolute ( ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_relative()

bool ghc::filesystem::path::is_relative ( ) const
inline
Here is the call graph for this function:

◆ lexically_normal()

path ghc::filesystem::path::lexically_normal ( ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ lexically_proximate()

path ghc::filesystem::path::lexically_proximate ( const path base) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ lexically_relative()

path ghc::filesystem::path::lexically_relative ( const path base) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_preferred()

path & ghc::filesystem::path::make_preferred ( )
inline

◆ native()

const path::string_type & ghc::filesystem::path::native ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ operator string_type()

ghc::filesystem::path::operator path::string_type ( ) const
inline
Here is the call graph for this function:

◆ operator+=() [1/6]

path & ghc::filesystem::path::operator+= ( const path x)
inline
Here is the call graph for this function:

◆ operator+=() [2/6]

template<class Source >
path::path_from_string< Source > & ghc::filesystem::path::operator+= ( const Source &  x)
inline
Here is the call graph for this function:

◆ operator+=() [3/6]

path & ghc::filesystem::path::operator+= ( const string_type x)
inline
Here is the call graph for this function:

◆ operator+=() [4/6]

path & ghc::filesystem::path::operator+= ( const value_type x)
inline
Here is the call graph for this function:

◆ operator+=() [5/6]

template<class EcharT >
path::path_type_EcharT< EcharT > & ghc::filesystem::path::operator+= ( EcharT  x)
inline
Here is the call graph for this function:

◆ operator+=() [6/6]

path & ghc::filesystem::path::operator+= ( value_type  x)
inline

◆ operator/=() [1/2]

path & ghc::filesystem::path::operator/= ( const path p)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator/=() [2/2]

template<class Source >
path & ghc::filesystem::path::operator/= ( const Source &  source)
inline
Here is the call graph for this function:

◆ operator=() [1/4]

path & ghc::filesystem::path::operator= ( const path p)
inline

◆ operator=() [2/4]

template<class Source >
path & ghc::filesystem::path::operator= ( const Source &  source)
inline
Here is the call graph for this function:

◆ operator=() [3/4]

path & ghc::filesystem::path::operator= ( path &&  p)
inlinenoexcept

◆ operator=() [4/4]

path & ghc::filesystem::path::operator= ( path::string_type &&  source)
inline
Here is the call graph for this function:

◆ parent_path()

path ghc::filesystem::path::parent_path ( ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ relative_path()

path ghc::filesystem::path::relative_path ( ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove_filename()

path & ghc::filesystem::path::remove_filename ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ replace_extension()

path & ghc::filesystem::path::replace_extension ( const path replacement = path())
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ replace_filename()

path & ghc::filesystem::path::replace_filename ( const path replacement)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ root_directory()

path ghc::filesystem::path::root_directory ( ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ root_name()

path ghc::filesystem::path::root_name ( ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ root_path()

path ghc::filesystem::path::root_path ( ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stem()

path ghc::filesystem::path::stem ( ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ string() [1/2]

std::string ghc::filesystem::path::string ( ) const
inline
Here is the call graph for this function:

◆ string() [2/2]

template<class EcharT , class traits , class Allocator >
std::basic_string< EcharT, traits, Allocator > ghc::filesystem::path::string ( const Allocator &  a = Allocator()) const
inline
Here is the caller graph for this function:

◆ swap()

void ghc::filesystem::path::swap ( path rhs)
inlinenoexcept

◆ u16string()

std::u16string ghc::filesystem::path::u16string ( ) const
inline

◆ u32string()

std::u32string ghc::filesystem::path::u32string ( ) const
inline

◆ u8string()

std::string ghc::filesystem::path::u8string ( ) const
inline
Here is the call graph for this function:

◆ wstring()

std::wstring ghc::filesystem::path::wstring ( ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ canonical

path canonical ( const path p,
std::error_code &  ec 
)
friend

◆ create_directories

bool create_directories ( const path p,
std::error_code &  ec 
)
friend

◆ directory_iterator

friend class directory_iterator
friend

◆ hash_value

size_t hash_value ( const path p)
friend

◆ swap

void swap ( path lhs,
path rhs 
)
friend

The documentation for this class was generated from the following file: