WPILibC++ 2023.4.3
ghc::filesystem::path Class Reference

#include </home/runner/work/allwpilib/allwpilib/wpiutil/src/main/native/thirdparty/ghc/include/wpi/ghc/filesystem.hpp>

Inheritance diagram for ghc::filesystem::path:
ghc::filesystem::path_helper_base< std::string::value_type >

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

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
 
using value_type = const path
 
using difference_type = std::ptrdiff_t
 
using pointer = const path *
 
using reference = const path &
 
using iterator_category = std::bidirectional_iterator_tag
 

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
 
 iterator ()
 
 iterator (const path &p, const impl_string_type::const_iterator &pos)
 
iteratoroperator++ ()
 
iterator operator++ (int)
 
iteratoroperator-- ()
 
iterator operator-- (int)
 
bool operator== (const iterator &other) const
 
bool operator!= (const iterator &other) const
 
reference operator* () const
 
pointer operator-> () const
 
template<>
pathassign (const path &source)
 
template<>
pathappend (const path &p)
 

Friends

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

Member Typedef Documentation

◆ const_iterator

◆ difference_type

◆ iterator_category

using ghc::filesystem::path::iterator_category = std::bidirectional_iterator_tag

◆ 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

◆ pointer

◆ reference

◆ string_type

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

◆ 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 ( )
noexcept

◆ path() [2/6]

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

◆ path() [3/6]

GHC_INLINE ghc::filesystem::path::path ( path &&  p)
noexcept

◆ path() [4/6]

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

◆ 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_INLINE ghc::filesystem::path::~path ( )

Member Function Documentation

◆ append() [1/3]

template<>
path & ghc::filesystem::path::append ( const path p)
inline

◆ append() [2/3]

template<class Source >
path & ghc::filesystem::path::append ( const Source &  source)
inline

◆ append() [3/3]

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

◆ 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

◆ assign() [3/4]

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

◆ assign() [4/4]

GHC_INLINE path & ghc::filesystem::path::assign ( path::string_type &&  source)

◆ begin()

GHC_INLINE path::iterator ghc::filesystem::path::begin ( ) const

◆ c_str()

GHC_INLINE const path::value_type * ghc::filesystem::path::c_str ( ) const
noexcept

◆ clear()

GHC_INLINE void ghc::filesystem::path::clear ( )
noexcept

◆ compare() [1/3]

GHC_INLINE int ghc::filesystem::path::compare ( const path p) const
noexcept

◆ compare() [2/3]

GHC_INLINE int ghc::filesystem::path::compare ( const string_type s) const

◆ compare() [3/3]

GHC_INLINE int ghc::filesystem::path::compare ( const value_type s) const

◆ concat() [1/2]

template<class Source >
path & ghc::filesystem::path::concat ( const Source &  x)
inline

◆ concat() [2/2]

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

◆ empty()

GHC_INLINE bool ghc::filesystem::path::empty ( ) const
noexcept

◆ end()

GHC_INLINE path::iterator ghc::filesystem::path::end ( ) const

◆ extension()

GHC_INLINE path ghc::filesystem::path::extension ( ) const

◆ filename()

GHC_INLINE path ghc::filesystem::path::filename ( ) const

◆ generic_string() [1/2]

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

◆ 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()

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

◆ generic_u32string()

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

◆ generic_u8string()

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

◆ generic_wstring()

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

◆ has_extension()

GHC_INLINE bool ghc::filesystem::path::has_extension ( ) const

◆ has_filename()

GHC_INLINE bool ghc::filesystem::path::has_filename ( ) const

◆ has_parent_path()

GHC_INLINE bool ghc::filesystem::path::has_parent_path ( ) const

◆ has_relative_path()

GHC_INLINE bool ghc::filesystem::path::has_relative_path ( ) const

◆ has_root_directory()

GHC_INLINE bool ghc::filesystem::path::has_root_directory ( ) const

◆ has_root_name()

GHC_INLINE bool ghc::filesystem::path::has_root_name ( ) const

◆ has_root_path()

GHC_INLINE bool ghc::filesystem::path::has_root_path ( ) const

◆ has_stem()

GHC_INLINE bool ghc::filesystem::path::has_stem ( ) const

◆ is_absolute()

GHC_INLINE bool ghc::filesystem::path::is_absolute ( ) const

◆ is_relative()

GHC_INLINE bool ghc::filesystem::path::is_relative ( ) const

◆ iterator() [1/2]

ghc::filesystem::path::iterator ( )

◆ iterator() [2/2]

ghc::filesystem::path::iterator ( const path p,
const impl_string_type::const_iterator &  pos 
)

◆ lexically_normal()

GHC_INLINE path ghc::filesystem::path::lexically_normal ( ) const

◆ lexically_proximate()

GHC_INLINE path ghc::filesystem::path::lexically_proximate ( const path base) const

◆ lexically_relative()

GHC_INLINE path ghc::filesystem::path::lexically_relative ( const path base) const

◆ make_preferred()

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

◆ native()

GHC_INLINE const path::string_type & ghc::filesystem::path::native ( ) const
noexcept

◆ operator string_type()

GHC_INLINE ghc::filesystem::path::operator path::string_type ( ) const

◆ operator!=()

bool ghc::filesystem::path::operator!= ( const iterator other) const

◆ operator*()

reference ghc::filesystem::path::operator* ( ) const

◆ operator++() [1/2]

iterator & ghc::filesystem::path::operator++ ( )

◆ operator++() [2/2]

iterator ghc::filesystem::path::operator++ ( int  )

◆ operator+=() [1/6]

GHC_INLINE path & ghc::filesystem::path::operator+= ( const path x)

◆ operator+=() [2/6]

template<class Source >
path::path_from_string< Source > & ghc::filesystem::path::operator+= ( const Source &  x)
inline

◆ operator+=() [3/6]

GHC_INLINE path & ghc::filesystem::path::operator+= ( const string_type x)

◆ operator+=() [4/6]

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

◆ operator+=() [5/6]

template<class EcharT >
path::path_type_EcharT< EcharT > & ghc::filesystem::path::operator+= ( EcharT  x)
inline

◆ operator+=() [6/6]

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

◆ operator--() [1/2]

iterator & ghc::filesystem::path::operator-- ( )

◆ operator--() [2/2]

iterator ghc::filesystem::path::operator-- ( int  )

◆ operator->()

pointer ghc::filesystem::path::operator-> ( ) const

◆ operator/=() [1/2]

GHC_INLINE path & ghc::filesystem::path::operator/= ( const path p)

◆ operator/=() [2/2]

template<class Source >
path & ghc::filesystem::path::operator/= ( const Source &  source)
inline

◆ operator=() [1/4]

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

◆ operator=() [2/4]

template<class Source >
path & ghc::filesystem::path::operator= ( const Source &  source)
inline

◆ operator=() [3/4]

GHC_INLINE path & ghc::filesystem::path::operator= ( path &&  p)
noexcept

◆ operator=() [4/4]

GHC_INLINE path & ghc::filesystem::path::operator= ( path::string_type &&  source)

◆ operator==()

bool ghc::filesystem::path::operator== ( const iterator other) const

◆ parent_path()

GHC_INLINE path ghc::filesystem::path::parent_path ( ) const

◆ relative_path()

GHC_INLINE path ghc::filesystem::path::relative_path ( ) const

◆ remove_filename()

GHC_INLINE path & ghc::filesystem::path::remove_filename ( )

◆ replace_extension()

GHC_INLINE path & ghc::filesystem::path::replace_extension ( const path replacement = path())

◆ replace_filename()

GHC_INLINE path & ghc::filesystem::path::replace_filename ( const path replacement)

◆ root_directory()

GHC_INLINE path ghc::filesystem::path::root_directory ( ) const

◆ root_name()

GHC_INLINE path ghc::filesystem::path::root_name ( ) const

◆ root_path()

GHC_INLINE path ghc::filesystem::path::root_path ( ) const

◆ stem()

GHC_INLINE path ghc::filesystem::path::stem ( ) const

◆ string() [1/2]

GHC_INLINE std::string ghc::filesystem::path::string ( ) const

◆ 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

◆ swap()

GHC_INLINE void ghc::filesystem::path::swap ( path rhs)
noexcept

◆ u16string()

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

◆ u32string()

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

◆ u8string()

GHC_INLINE std::string ghc::filesystem::path::u8string ( ) const

◆ wstring()

GHC_INLINE std::wstring ghc::filesystem::path::wstring ( ) const

Friends And Related Function Documentation

◆ canonical

path canonical ( 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

◆ path

GHC_INLINE ghc::filesystem::path::path
friend

◆ swap

void swap ( path lhs,
path rhs 
)
friend

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