STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
experimental::filesystem::v1::path Class Reference

Public Types

typedef _Pchar value_type
 
typedef basic_string< value_typestring_type
 
typedef _Path_iterator< pathiterator
 
typedef iterator const_iterator
 

Public Member Functions

 path ()
 
 path (const path &_Right)
 
template<class _InIt , class = typename enable_if<_Is_iterator<_InIt>::value, void>::type>
 path (_InIt _First, _InIt _Last)
 
template<class _InIt , class = typename enable_if<_Is_iterator<_InIt>::value, void>::type>
 path (_InIt _First)
 
template<class _Elem , class _Traits , class _Alloc >
 path (const basic_string< _Elem, _Traits, _Alloc > &_Str)
 
template<class _InIt , class = typename enable_if<_Is_iterator<_InIt>::value, void>::type>
 path (_InIt _First, _InIt _Last, const locale &_Loc)
 
template<class _InIt , class = typename enable_if<_Is_iterator<_InIt>::value, void>::type>
 path (_InIt _First, const locale &_Loc)
 
template<class _Elem , class _Traits , class _Alloc >
 path (const basic_string< _Elem, _Traits, _Alloc > &_Str, const locale &_Loc)
 
 path (path &&_Right) _NOEXCEPT
 
pathoperator= (path &&_Right) _NOEXCEPT
 
 ~path () _NOEXCEPT
 
pathoperator= (const path &_Right)
 
template<class _InIt >
pathoperator= (_InIt _First)
 
template<class _Elem , class _Traits , class _Alloc >
pathoperator= (const basic_string< _Elem, _Traits, _Alloc > &_Str)
 
template<class _InIt >
pathassign (_InIt _First, _InIt _Last)
 
template<class _InIt >
pathassign (_InIt _First)
 
template<class _Elem , class _Traits , class _Alloc >
pathassign (const basic_string< _Elem, _Traits, _Alloc > &_Str)
 
pathoperator/= (const path &_Path)
 
template<class _InIt >
pathoperator/= (_InIt _First)
 
template<class _Elem , class _Traits , class _Alloc >
pathoperator/= (const basic_string< _Elem, _Traits, _Alloc > &_Str)
 
template<class _InIt >
pathappend (_InIt _First, _InIt _Last)
 
template<class _InIt >
pathappend (_InIt _First)
 
template<class _Elem , class _Traits , class _Alloc >
pathappend (const basic_string< _Elem, _Traits, _Alloc > &_Str0)
 
pathoperator+= (const path &_Path)
 
template<class _Ty >
pathoperator+= (_Ty _Val)
 
template<class _Elem , class _Traits , class _Alloc >
pathoperator+= (const basic_string< _Elem, _Traits, _Alloc > &_Str)
 
template<class _Elem >
pathoperator+= (const _Elem *_Ptr)
 
template<class _InIt >
pathconcat (_InIt _First, _InIt _Last)
 
template<class _InIt , class = typename enable_if<_Is_iterator<_InIt>::value, void>::type>
pathconcat (_InIt _First)
 
template<class _Elem >
pathconcat (const _Elem *_Ptr)
 
template<class _Elem >
pathconcat (_Elem _Val)
 
template<class _Elem , class _Traits , class _Alloc >
pathconcat (const basic_string< _Elem, _Traits, _Alloc > &_Str)
 
void clear () _NOEXCEPT
 
pathmake_preferred ()
 
pathremove_filename ()
 
pathreplace_filename (const path &_Path)
 
pathreplace_extension (const path &_Newext=path())
 
void swap (path &_Right) _NOEXCEPT
 
const string_typenative () const _NOEXCEPT
 
const value_typec_str () const _NOEXCEPT
 
 operator string_type () const
 
template<class _Elem , class _Traits = char_traits<_Elem>, class _Alloc = allocator<_Elem>>
basic_string< _Elem, _Traits, _Alloc > string (const _Alloc &_Al=_Alloc()) const
 
_STD string string () const
 
_STD wstring wstring () const
 
_STD string u8string () const
 
_STD u16string u16string () const
 
_STD u32string u32string () const =delete
 
string_type _Make_generic () const
 
template<class _Elem , class _Traits = char_traits<_Elem>, class _Alloc = allocator<_Elem>>
basic_string< _Elem, _Traits, _Alloc > generic_string (const _Alloc &_Al=_Alloc()) 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 =delete
 
int compare (const path &_Path) const _NOEXCEPT
 
int compare (const string_type &_Str) const
 
int compare (const value_type *_Ptr) 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
 
iterator begin () const
 
iterator end () const
 
size_t _Prefix_end () const
 
size_t _Root_end () const
 

Public Attributes

string_type _Mystr
 

Static Public Attributes

static constexpr value_type preferred_separator = _FS_PREF
 

Member Typedef Documentation

Constructor & Destructor Documentation

experimental::filesystem::v1::path::path ( )
inline
853  { // default construct
854  }
experimental::filesystem::v1::path::path ( const path _Right)
inline
857  : _Mystr(_Right._Mystr)
858  { // copy construct
859  }
string_type _Mystr
Definition: filesystem:1492
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _InIt , class = typename enable_if<_Is_iterator<_InIt>::value, void>::type>
experimental::filesystem::v1::path::path ( _InIt  _First,
_InIt  _Last 
)
inline
868  { // construct from [_First, _Last), given iterators
869  typedef _Iter_value_t<_InIt> _Valty;
870  basic_string<_Valty> _Str(_First, _Last);
871  string_type _Str_out;
873  _Cvt(_Str_out, _Str.c_str(), _Str.size());
874  }
typename iterator_traits< _Iter >::value_type _Iter_value_t
Definition: xutility:647
basic_string< value_type > string_type
Definition: filesystem:849
Definition: xstring:21
static _Outstr && _Cvt(_Outstr &_Str, const _Inchar *_First, size_t _Size, const locale &=locale())
Definition: filesystem:199
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class = typename enable_if<_Is_iterator<_InIt>::value, void>::type>
experimental::filesystem::v1::path::path ( _InIt  _First)
inline
881  { // construct from NTCTS, given iterator
882  typedef _Iter_value_t<_InIt> _Valty;
884  for (; *_First != _Valty(0); ++_First)
885  _Str += *_First;
886  string_type _Str_out;
888  _Cvt(_Str_out, _Str.c_str(), _Str.size());
889  }
const _Elem * c_str() const _NOEXCEPT
Definition: xstring:1741
typename iterator_traits< _Iter >::value_type _Iter_value_t
Definition: xutility:647
size_type size() const _NOEXCEPT
Definition: xstring:1763
basic_string< value_type > string_type
Definition: filesystem:849
Definition: xstring:21
static _Outstr && _Cvt(_Outstr &_Str, const _Inchar *_First, size_t _Size, const locale &=locale())
Definition: filesystem:199
template<class _Elem , class _Traits , class _Alloc >
experimental::filesystem::v1::path::path ( const basic_string< _Elem, _Traits, _Alloc > &  _Str)
inline
895  { // construct from arbitrary source string
896  string_type _Str_out;
898  _Cvt(_Str_out, _Str.c_str(), _Str.size());
899  }
const _Elem * c_str() const _NOEXCEPT
Definition: xstring:1741
size_type size() const _NOEXCEPT
Definition: xstring:1763
basic_string< value_type > string_type
Definition: filesystem:849
static _Outstr && _Cvt(_Outstr &_Str, const _Inchar *_First, size_t _Size, const locale &=locale())
Definition: filesystem:199
template<class _InIt , class = typename enable_if<_Is_iterator<_InIt>::value, void>::type>
experimental::filesystem::v1::path::path ( _InIt  _First,
_InIt  _Last,
const locale _Loc 
)
inline
909  { // construct from [_First, _Last), given iterators
910  typedef _Iter_value_t<_InIt> _Valty;
911  basic_string<_Valty> _Str(_First, _Last);
912  string_type _Str_out;
914  _Cvt(_Str_out, _Str.c_str(), _Str.size(), _Loc);
915  }
typename iterator_traits< _Iter >::value_type _Iter_value_t
Definition: xutility:647
basic_string< value_type > string_type
Definition: filesystem:849
Definition: xstring:21
static _Outstr && _Cvt(_Outstr &_Str, const _Inchar *_First, size_t _Size, const locale &=locale())
Definition: filesystem:199
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class = typename enable_if<_Is_iterator<_InIt>::value, void>::type>
experimental::filesystem::v1::path::path ( _InIt  _First,
const locale _Loc 
)
inline
923  { // construct from NTCTS, given iterator
924  typedef _Iter_value_t<_InIt> _Valty;
926  for (; *_First != _Valty(0); ++_First)
927  _Str += *_First;
928  string_type _Str_out;
930  _Cvt(_Str_out, _Str.c_str(), _Str.size(), _Loc);
931  }
const _Elem * c_str() const _NOEXCEPT
Definition: xstring:1741
typename iterator_traits< _Iter >::value_type _Iter_value_t
Definition: xutility:647
size_type size() const _NOEXCEPT
Definition: xstring:1763
basic_string< value_type > string_type
Definition: filesystem:849
Definition: xstring:21
static _Outstr && _Cvt(_Outstr &_Str, const _Inchar *_First, size_t _Size, const locale &=locale())
Definition: filesystem:199
template<class _Elem , class _Traits , class _Alloc >
experimental::filesystem::v1::path::path ( const basic_string< _Elem, _Traits, _Alloc > &  _Str,
const locale _Loc 
)
inline
938  { // construct from arbitrary source string
939  string_type _Str_out;
941  _Cvt(_Str_out, _Str.c_str(), _Str.size(), _Loc);
942  }
const _Elem * c_str() const _NOEXCEPT
Definition: xstring:1741
size_type size() const _NOEXCEPT
Definition: xstring:1763
basic_string< value_type > string_type
Definition: filesystem:849
static _Outstr && _Cvt(_Outstr &_Str, const _Inchar *_First, size_t _Size, const locale &=locale())
Definition: filesystem:199
experimental::filesystem::v1::path::path ( path &&  _Right)
inline
945  : _Mystr(_STD move(_Right._Mystr))
946  { // move construct
947  }
string_type _Mystr
Definition: filesystem:1492
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
constexpr const _Ty &() _Right
Definition: algorithm:3591
experimental::filesystem::v1::path::~path ( )
inline
956  { // destroy the object
957  }

Member Function Documentation

string_type experimental::filesystem::v1::path::_Make_generic ( ) const
inline
1246  { // copy and convert any '\' to '/'
1247  string_type _Str = _Mystr;
1248  _STD replace(_Str.begin(), _Str.end(), _FS_BSLASH, _FS_SLASH);
1249  return (_Str);
1250  }
#define _FS_BSLASH
Definition: filesystem:38
void replace(_FwdIt _First, _FwdIt _Last, const _Ty &_Oldval, const _Ty &_Newval)
Definition: algorithm:1127
#define _FS_SLASH
Definition: filesystem:37
string_type _Mystr
Definition: filesystem:1492
basic_string< value_type > string_type
Definition: filesystem:849
size_t experimental::filesystem::v1::path::_Prefix_end ( ) const
inline
1461  { // get end of prefix
1462  if (2 < _Mystr.size()
1463  && _FS_ISSEP(_Mystr[0])
1464  && _FS_ISSEP(_Mystr[1])
1465  && !_FS_ISSEP(_Mystr[2]))
1466  { // network name, pick off \\name
1467  size_t _Idx = 3;
1468  for (; _Idx < _Mystr.size() && !_FS_ISSEP(_Mystr[_Idx]); ++_Idx)
1469  ;
1470  return (_Idx);
1471  }
1472  else
1473  { // no network name, pick off drive:
1474  size_t _Idx = _Mystr.find(_FS_COLON, 0);
1475  if (_Idx == _Mystr.npos)
1476  _Idx = 0;
1477  else
1478  ++_Idx;
1479  return (_Idx);
1480  }
1481  }
static _PGLOBAL const size_type npos
Definition: xstring:1020
#define _FS_ISSEP(x)
Definition: filesystem:32
size_type find(const _Myt &_Right, size_type _Off=0) const _NOEXCEPT
Definition: xstring:1868
string_type _Mystr
Definition: filesystem:1492
size_type size() const _NOEXCEPT
Definition: xstring:1763
#define _FS_COLON
Definition: filesystem:35
size_t experimental::filesystem::v1::path::_Root_end ( ) const
inline
1484  { // get end of root
1485  size_t _Idx = _Prefix_end();
1486  if (_Idx < _Mystr.size()
1487  && _FS_ISSEP(_Mystr[_Idx]))
1488  ++_Idx;
1489  return (_Idx);
1490  }
#define _FS_ISSEP(x)
Definition: filesystem:32
size_t _Prefix_end() const
Definition: filesystem:1460
string_type _Mystr
Definition: filesystem:1492
size_type size() const _NOEXCEPT
Definition: xstring:1763
template<class _InIt >
path& experimental::filesystem::v1::path::append ( _InIt  _First,
_InIt  _Last 
)
inline
1025  { // append NTCTS
1026  return (append(path(_First, _Last)._Mystr));
1027  }
path()
Definition: filesystem:852
string_type _Mystr
Definition: filesystem:1492
_FwdIt _Last
Definition: algorithm:1936
path & append(_InIt _First, _InIt _Last)
Definition: filesystem:1024
template<class _InIt >
path& experimental::filesystem::v1::path::append ( _InIt  _First)
inline
1031  { // append NTCTS
1032  return (append(path(_First)._Mystr));
1033  }
path()
Definition: filesystem:852
string_type _Mystr
Definition: filesystem:1492
path & append(_InIt _First, _InIt _Last)
Definition: filesystem:1024
template<class _Elem , class _Traits , class _Alloc >
path& experimental::filesystem::v1::path::append ( const basic_string< _Elem, _Traits, _Alloc > &  _Str0)
inline
1040  { // append arbitrary source string
1041  string_type _Str(_Str0.begin(), _Str0.end()); // avoid overlap
1042 
1043  for (size_t _Idx = 0; _Idx < _Str.size(); ++_Idx)
1044  if (_Str[_Idx] == _FS_SLASH)
1045  _Str[_Idx] = _FS_PREF; // convert '/' to '\'
1046 
1047  if (0 < _Mystr.size() && 0 < _Str.size()
1048  && _Mystr.back() != _FS_COLON
1049  && !_FS_ISSEP(_Mystr.back())
1050  && !_FS_ISSEP(_Str[0]))
1051  _Mystr.append(1, _FS_PREF); // add needed separator
1052 
1053  _Mystr.append(_Str);
1054  return (*this);
1055  }
reference back()
Definition: xstring:1731
#define _FS_ISSEP(x)
Definition: filesystem:32
#define _FS_SLASH
Definition: filesystem:37
iterator end() _NOEXCEPT
Definition: xstring:1605
string_type _Mystr
Definition: filesystem:1492
iterator begin() _NOEXCEPT
Definition: xstring:1593
size_type size() const _NOEXCEPT
Definition: xstring:1763
basic_string< value_type > string_type
Definition: filesystem:849
_Myt & append(_XSTD initializer_list< _Elem > _Ilist)
Definition: xstring:998
#define _FS_COLON
Definition: filesystem:35
#define _FS_PREF
Definition: filesystem:33
template<class _InIt >
path& experimental::filesystem::v1::path::assign ( _InIt  _First,
_InIt  _Last 
)
inline
983  { // assign from [_First, _Last), given iterators
984  return (*this = path(_First, _Last));
985  }
path()
Definition: filesystem:852
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt >
path& experimental::filesystem::v1::path::assign ( _InIt  _First)
inline
989  { // assign from NTCTS
990  return (*this = path(_First));
991  }
path()
Definition: filesystem:852
template<class _Elem , class _Traits , class _Alloc >
path& experimental::filesystem::v1::path::assign ( const basic_string< _Elem, _Traits, _Alloc > &  _Str)
inline
998  { // assign from arbitrary source string
999  return (*this = path(_Str));
1000  }
path()
Definition: filesystem:852
iterator experimental::filesystem::v1::path::begin ( ) const
inline
1451  { // get beginning of path
1452  return (iterator(*this, (size_t)0));
1453  }
_Path_iterator< path > iterator
Definition: filesystem:1447
const value_type* experimental::filesystem::v1::path::c_str ( ) const
inline
1185  { // get the stored string
1186  return (_Mystr.c_str());
1187  }
const _Elem * c_str() const _NOEXCEPT
Definition: xstring:1741
string_type _Mystr
Definition: filesystem:1492
void experimental::filesystem::v1::path::clear ( )
inline
1123  { // clear the stored string
1124  _Mystr.clear();
1125  }
string_type _Mystr
Definition: filesystem:1492
void clear() _NOEXCEPT
Definition: xstring:1376
int experimental::filesystem::v1::path::compare ( const path _Path) const
inline
1309  { // compare native() to _Path.native()
1310  return (_Mystr.compare(_Path._Mystr));
1311  }
int compare(const _Myt &_Right) const _NOEXCEPT
Definition: xstring:2119
string_type _Mystr
Definition: filesystem:1492
int experimental::filesystem::v1::path::compare ( const string_type _Str) const
inline
1314  { // compare native() to string
1315  return (_Mystr.compare(_Str));
1316  }
int compare(const _Myt &_Right) const _NOEXCEPT
Definition: xstring:2119
string_type _Mystr
Definition: filesystem:1492
int experimental::filesystem::v1::path::compare ( const value_type _Ptr) const
inline
1319  { // compare native() to NTCS
1320  return (_Mystr.compare(_Ptr));
1321  }
int compare(const _Myt &_Right) const _NOEXCEPT
Definition: xstring:2119
string_type _Mystr
Definition: filesystem:1492
template<class _InIt >
path& experimental::filesystem::v1::path::concat ( _InIt  _First,
_InIt  _Last 
)
inline
1086  { // concatenate NTCTS
1087  return (concat(path(_First, _Last)._Mystr));
1088  }
path & concat(_InIt _First, _InIt _Last)
Definition: filesystem:1085
path()
Definition: filesystem:852
string_type _Mystr
Definition: filesystem:1492
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt , class = typename enable_if<_Is_iterator<_InIt>::value, void>::type>
path& experimental::filesystem::v1::path::concat ( _InIt  _First)
inline
1095  { // concatenate NTCTS
1096  return (concat(path(_First)._Mystr));
1097  }
path & concat(_InIt _First, _InIt _Last)
Definition: filesystem:1085
path()
Definition: filesystem:852
string_type _Mystr
Definition: filesystem:1492
template<class _Elem >
path& experimental::filesystem::v1::path::concat ( const _Elem *  _Ptr)
inline
1101  { // concatenate arbitrary NTCTS
1102  return (concat(basic_string<_Elem>(_Ptr)));
1103  }
path & concat(_InIt _First, _InIt _Last)
Definition: filesystem:1085
Definition: xstring:21
template<class _Elem >
path& experimental::filesystem::v1::path::concat ( _Elem  _Val)
inline
1107  { // concatenate element
1108  return (concat(path(basic_string<_Elem>((size_t)1, _Val))._Mystr));
1109  }
path & concat(_InIt _First, _InIt _Last)
Definition: filesystem:1085
_In_ int _Val
Definition: vcruntime_string.h:62
path()
Definition: filesystem:852
string_type _Mystr
Definition: filesystem:1492
Definition: xstring:21
template<class _Elem , class _Traits , class _Alloc >
path& experimental::filesystem::v1::path::concat ( const basic_string< _Elem, _Traits, _Alloc > &  _Str)
inline
1116  { // concatenate arbitrary source string
1117  _Mystr.append(_Str.begin(), _Str.end());
1118  return (*this);
1119  }
iterator end() _NOEXCEPT
Definition: xstring:1605
string_type _Mystr
Definition: filesystem:1492
iterator begin() _NOEXCEPT
Definition: xstring:1593
_Myt & append(_XSTD initializer_list< _Elem > _Ilist)
Definition: xstring:998
bool experimental::filesystem::v1::path::empty ( ) const
inline
1392  { // test if stored string is empty
1393  return (_Mystr.empty());
1394  }
string_type _Mystr
Definition: filesystem:1492
bool empty() const _NOEXCEPT
Definition: xstring:1802
iterator experimental::filesystem::v1::path::end ( ) const
inline
1456  { // get end of path
1457  return (iterator(*this, _Mystr.size()));
1458  }
_Path_iterator< path > iterator
Definition: filesystem:1447
string_type _Mystr
Definition: filesystem:1492
size_type size() const _NOEXCEPT
Definition: xstring:1763
path experimental::filesystem::v1::path::extension ( ) const
inline
1381  { // pick off .extension in filename (leaf), including dot
1382  string_type _Str = filename().native();
1383  size_t _Idx = _Str.rfind(_FS_PERIOD);
1384  return (_Idx == string_type::npos // no .
1385  || _Str.size() == 1 // only .
1386  || (_Str.size() == 2 && _Str[0] == _FS_PERIOD
1387  && _Str[1] == _FS_PERIOD) // only ..
1388  ? path() : path(_Str.substr(_Idx)));
1389  }
static _PGLOBAL const size_type npos
Definition: xstring:1020
path filename() const
Definition: filesystem:1367
path()
Definition: filesystem:852
size_type rfind(const _Myt &_Right, size_type _Off=npos) const _NOEXCEPT
Definition: xstring:1905
#define _FS_PERIOD
Definition: filesystem:36
const string_type & native() const _NOEXCEPT
Definition: filesystem:1179
basic_string< value_type > string_type
Definition: filesystem:849
path experimental::filesystem::v1::path::filename ( ) const
inline
1368  { // get filename (leaf)
1369  return (empty() ? path() : path(*--end()));
1370  }
bool empty() const _NOEXCEPT
Definition: filesystem:1391
path()
Definition: filesystem:852
iterator end() const
Definition: filesystem:1455
template<class _Elem , class _Traits = char_traits<_Elem>, class _Alloc = allocator<_Elem>>
basic_string<_Elem, _Traits, _Alloc> experimental::filesystem::v1::path::generic_string ( const _Alloc &  _Al = _Alloc()) const
inline
1257  { // return path as basic_string<_Elem, _Traits, _Alloc>
1259  const string_type _Genstr = _Make_generic();
1260  return (_Path_cvt<value_type, _Elem>::
1261  _Cvt(_Str, _Genstr.c_str(), _Genstr.size()));
1262  }
string_type _Make_generic() const
Definition: filesystem:1245
basic_string< value_type > string_type
Definition: filesystem:849
Definition: xstring:21
_STD string experimental::filesystem::v1::path::generic_string ( ) const
inline
1265  { // return path as basic_string<char> native
1266  _STD string _Str;
1267  const string_type _Genstr = _Make_generic();
1268  return (_Path_cvt<value_type, char>::
1269  _Cvt(_Str, _Genstr.c_str(), _Genstr.size()));
1270  }
string_type _Make_generic() const
Definition: filesystem:1245
basic_string< value_type > string_type
Definition: filesystem:849
_STD u16string experimental::filesystem::v1::path::generic_u16string ( ) const
inline
1290  { // return path as basic_string<char16_t> UTF16
1291  _STD u16string _Str;
1292  const string_type _Genstr = _Make_generic();
1293  return (_Path_cvt<value_type, char16_t>::
1294  _Cvt(_Str, _Genstr.c_str(), _Genstr.size()));
1295  }
string_type _Make_generic() const
Definition: filesystem:1245
basic_string< value_type > string_type
Definition: filesystem:849
Definition: xstring:21
_STD u32string experimental::filesystem::v1::path::generic_u32string ( ) const
delete
_STD string experimental::filesystem::v1::path::generic_u8string ( ) const
inline
1281  { // return path as basic_string<char> UTF8
1282  _STD string _Str;
1283  const string_type _Genstr = _Make_generic();
1284  return (_Path_cvt<value_type, char8_t,
1286  _Cvt(_Str, _Genstr.c_str(), _Genstr.size()));
1287  }
string_type _Make_generic() const
Definition: filesystem:1245
Definition: iosfwd:612
Definition: iosfwd:505
basic_string< value_type > string_type
Definition: filesystem:849
_Pchar value_type
Definition: filesystem:848
_STD wstring experimental::filesystem::v1::path::generic_wstring ( ) const
inline
1273  { // return path as basic_string<wchar_t> native
1274  _STD wstring _Str;
1275  const string_type _Genstr = _Make_generic();
1276  return (_Path_cvt<value_type, wchar_t>::
1277  _Cvt(_Str, _Genstr.c_str(), _Genstr.size()));
1278  }
string_type _Make_generic() const
Definition: filesystem:1245
basic_string< value_type > string_type
Definition: filesystem:849
Definition: xstring:21
bool experimental::filesystem::v1::path::has_extension ( ) const
inline
1432  { // test if extension is nonempty
1433  return (!extension().empty());
1434  }
bool empty() const _NOEXCEPT
Definition: filesystem:1391
path extension() const
Definition: filesystem:1380
bool experimental::filesystem::v1::path::has_filename ( ) const
inline
1422  { // test if filename (leaf) is nonempty
1423  return (!filename().empty());
1424  }
bool empty() const _NOEXCEPT
Definition: filesystem:1391
path filename() const
Definition: filesystem:1367
bool experimental::filesystem::v1::path::has_parent_path ( ) const
inline
1417  { // test if parent (branch) path is nonempty
1418  return (!parent_path().empty());
1419  }
bool empty() const _NOEXCEPT
Definition: filesystem:1391
path parent_path() const
Definition: filesystem:1355
bool experimental::filesystem::v1::path::has_relative_path ( ) const
inline
1412  { // test if relative path is nonempty
1413  return (!relative_path().empty());
1414  }
bool empty() const _NOEXCEPT
Definition: filesystem:1391
path relative_path() const
Definition: filesystem:1345
bool experimental::filesystem::v1::path::has_root_directory ( ) const
inline
1402  { // test if root directory is nonempty
1403  return (!root_directory().empty());
1404  }
bool empty() const _NOEXCEPT
Definition: filesystem:1391
path root_directory() const
Definition: filesystem:1329
bool experimental::filesystem::v1::path::has_root_name ( ) const
inline
1397  { // test if root name is nonempty
1398  return (!root_name().empty());
1399  }
bool empty() const _NOEXCEPT
Definition: filesystem:1391
path root_name() const
Definition: filesystem:1324
bool experimental::filesystem::v1::path::has_root_path ( ) const
inline
1407  { // test if root path is nonempty
1408  return (!root_path().empty());
1409  }
bool empty() const _NOEXCEPT
Definition: filesystem:1391
path root_path() const
Definition: filesystem:1339
bool experimental::filesystem::v1::path::has_stem ( ) const
inline
1427  { // test if stem (basename) is nonempty
1428  return (!stem().empty());
1429  }
bool empty() const _NOEXCEPT
Definition: filesystem:1391
path stem() const
Definition: filesystem:1372
bool experimental::filesystem::v1::path::is_absolute ( ) const
inline
1437  { // test if path is absolute
1438  return (has_root_name() && has_root_directory());
1439  }
bool has_root_name() const
Definition: filesystem:1396
bool has_root_directory() const
Definition: filesystem:1401
bool experimental::filesystem::v1::path::is_relative ( ) const
inline
1442  { // test if path is relative
1443  return (!is_absolute());
1444  }
bool is_absolute() const
Definition: filesystem:1436
path& experimental::filesystem::v1::path::make_preferred ( )
inline
1128  { // convert any '/' to '\'
1129  for (size_t _Idx = 0; _Idx < _Mystr.size(); ++_Idx)
1130 
1131  if (_Mystr[_Idx] == _FS_SLASH)
1132  _Mystr[_Idx] = _FS_BSLASH;
1133 
1134  return (*this);
1135  }
#define _FS_BSLASH
Definition: filesystem:38
#define _FS_SLASH
Definition: filesystem:37
string_type _Mystr
Definition: filesystem:1492
size_type size() const _NOEXCEPT
Definition: xstring:1763
const string_type& experimental::filesystem::v1::path::native ( ) const
inline
1180  { // get the stored string
1181  return (_Mystr);
1182  }
string_type _Mystr
Definition: filesystem:1492
experimental::filesystem::v1::path::operator string_type ( ) const
inline
1190  { // convert to file string
1191  return (_Mystr);
1192  }
string_type _Mystr
Definition: filesystem:1492
path& experimental::filesystem::v1::path::operator+= ( const path _Path)
inline
1059  { // concatenate copy
1060  return (concat(_Path._Mystr));
1061  }
path & concat(_InIt _First, _InIt _Last)
Definition: filesystem:1085
template<class _Ty >
path& experimental::filesystem::v1::path::operator+= ( _Ty  _Val)
inline
1065  { // concatenate NTCTS, given iterator/element
1066  return (concat(_Val));
1067  }
path & concat(_InIt _First, _InIt _Last)
Definition: filesystem:1085
_In_ int _Val
Definition: vcruntime_string.h:62
template<class _Elem , class _Traits , class _Alloc >
path& experimental::filesystem::v1::path::operator+= ( const basic_string< _Elem, _Traits, _Alloc > &  _Str)
inline
1074  { // concatenate arbitrary source string
1075  return (concat(_Str));
1076  }
path & concat(_InIt _First, _InIt _Last)
Definition: filesystem:1085
template<class _Elem >
path& experimental::filesystem::v1::path::operator+= ( const _Elem *  _Ptr)
inline
1080  { // concatenate arbitrary NTCTS
1081  return (concat(basic_string<_Elem>(_Ptr)));
1082  }
path & concat(_InIt _First, _InIt _Last)
Definition: filesystem:1085
Definition: xstring:21
path& experimental::filesystem::v1::path::operator/= ( const path _Path)
inline
1004  { // append copy
1005  return (append(_Path._Mystr));
1006  }
path & append(_InIt _First, _InIt _Last)
Definition: filesystem:1024
template<class _InIt >
path& experimental::filesystem::v1::path::operator/= ( _InIt  _First)
inline
1010  { // append NTCTS, given iterator
1011  return (append(path(_First)._Mystr));
1012  }
path()
Definition: filesystem:852
string_type _Mystr
Definition: filesystem:1492
path & append(_InIt _First, _InIt _Last)
Definition: filesystem:1024
template<class _Elem , class _Traits , class _Alloc >
path& experimental::filesystem::v1::path::operator/= ( const basic_string< _Elem, _Traits, _Alloc > &  _Str)
inline
1019  { // append arbitrary source string
1020  return (append(_Str));
1021  }
path & append(_InIt _First, _InIt _Last)
Definition: filesystem:1024
path& experimental::filesystem::v1::path::operator= ( path &&  _Right)
inline
950  { // move assign
951  _Mystr = _STD move(_Right._Mystr);
952  return (*this);
953  }
string_type _Mystr
Definition: filesystem:1492
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
constexpr const _Ty &() _Right
Definition: algorithm:3591
path& experimental::filesystem::v1::path::operator= ( const path _Right)
inline
961  { // assign copy
962  _Mystr = _Right._Mystr;
963  return (*this);
964  }
string_type _Mystr
Definition: filesystem:1492
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _InIt >
path& experimental::filesystem::v1::path::operator= ( _InIt  _First)
inline
968  { // assign from NTCTS, given iterator
969  return (*this = path(_First));
970  }
path()
Definition: filesystem:852
template<class _Elem , class _Traits , class _Alloc >
path& experimental::filesystem::v1::path::operator= ( const basic_string< _Elem, _Traits, _Alloc > &  _Str)
inline
977  { // assign from arbitrary source string
978  return (*this = path(_Str));
979  }
path()
Definition: filesystem:852
path experimental::filesystem::v1::path::parent_path ( ) const
inline
1356  { // get parent (branch) path
1357  path _Ans;
1358  if (!empty())
1359  { // append all but last element
1360  iterator _End = --end();
1361  for (iterator _Next = begin(); _Next != _End; ++_Next)
1362  _Ans /= *_Next;
1363  }
1364  return (_Ans);
1365  }
bool empty() const _NOEXCEPT
Definition: filesystem:1391
_Path_iterator< path > iterator
Definition: filesystem:1447
path()
Definition: filesystem:852
iterator begin() const
Definition: filesystem:1450
iterator end() const
Definition: filesystem:1455
path experimental::filesystem::v1::path::relative_path ( ) const
inline
1346  { // get relative path
1347  size_t _Idx = _Root_end();
1348  while (_Idx < _Mystr.size()
1349  && _FS_ISSEP(_Mystr[_Idx]))
1350  ++_Idx; // skip extra '/' after root
1351 
1352  return (path(_Mystr.substr(_Idx)));
1353  }
_Myt substr(size_type _Off=0, size_type _Count=npos) const
Definition: xstring:2087
#define _FS_ISSEP(x)
Definition: filesystem:32
size_t _Root_end() const
Definition: filesystem:1483
path()
Definition: filesystem:852
string_type _Mystr
Definition: filesystem:1492
size_type size() const _NOEXCEPT
Definition: xstring:1763
path& experimental::filesystem::v1::path::remove_filename ( )
inline
1138  { // remove filename (leaf)
1139  if (!empty() && begin() != --end())
1140  { // leaf to remove, back up over it
1141  size_t _Rend = _Root_end();
1142  size_t _Idx = _Mystr.size();
1143 
1144  for (; _Rend < _Idx; --_Idx)
1145  if (_FS_ISSEP(_Mystr[_Idx - 1]))
1146  break; // back up over stuff at end
1147  for (; _Rend < _Idx; --_Idx)
1148  if (!_FS_ISSEP(_Mystr[_Idx - 1]))
1149  break; // back up over trailing non-root slashes
1150  _Mystr.erase(_Idx);
1151  }
1152  return (*this);
1153  }
bool empty() const _NOEXCEPT
Definition: filesystem:1391
#define _FS_ISSEP(x)
Definition: filesystem:32
size_t _Root_end() const
Definition: filesystem:1483
iterator begin() const
Definition: filesystem:1450
string_type _Mystr
Definition: filesystem:1492
_Myt & erase(size_type _Off=0)
Definition: xstring:1339
size_type size() const _NOEXCEPT
Definition: xstring:1763
iterator end() const
Definition: filesystem:1455
path& experimental::filesystem::v1::path::replace_extension ( const path _Newext = path())
inline
1163  { // replace extension with _Newext
1164  if (_Newext.empty() || _Newext.c_str()[0] == _FS_PERIOD)
1165  *this = parent_path()
1166  / path((stem().native() + _Newext.native()));
1167  else
1168  *this = parent_path()
1169  / path((stem().native() + _FS_PERIOD + _Newext.native()));
1170  return (*this);
1171  }
path stem() const
Definition: filesystem:1372
path()
Definition: filesystem:852
#define _FS_PERIOD
Definition: filesystem:36
const string_type & native() const _NOEXCEPT
Definition: filesystem:1179
path parent_path() const
Definition: filesystem:1355
path& experimental::filesystem::v1::path::replace_filename ( const path _Path)
inline
1156  { // replace filename
1157  remove_filename();
1158  *this /= _Path;
1159  return (*this);
1160  }
path & remove_filename()
Definition: filesystem:1137
path experimental::filesystem::v1::path::root_directory ( ) const
inline
1330  { // get root directory
1331  size_t _Idx = _Prefix_end();
1332  if (_Idx < _Mystr.size()
1333  && _FS_ISSEP(_Mystr[_Idx]))
1334  return (path(string_type(1, _FS_PREF)));
1335  else
1336  return (path());
1337  }
#define _FS_ISSEP(x)
Definition: filesystem:32
size_t _Prefix_end() const
Definition: filesystem:1460
path()
Definition: filesystem:852
string_type _Mystr
Definition: filesystem:1492
size_type size() const _NOEXCEPT
Definition: xstring:1763
basic_string< value_type > string_type
Definition: filesystem:849
#define _FS_PREF
Definition: filesystem:33
path experimental::filesystem::v1::path::root_name ( ) const
inline
1325  { // get root name
1326  return (path(_Mystr.substr(0, _Prefix_end())));
1327  }
_Myt substr(size_type _Off=0, size_type _Count=npos) const
Definition: xstring:2087
size_t _Prefix_end() const
Definition: filesystem:1460
path()
Definition: filesystem:852
string_type _Mystr
Definition: filesystem:1492
path experimental::filesystem::v1::path::root_path ( ) const
inline
1340  { // get root path
1341  return (path(_Mystr.c_str(),
1342  _Mystr.c_str() + _Root_end()));
1343  }
size_t _Root_end() const
Definition: filesystem:1483
const _Elem * c_str() const _NOEXCEPT
Definition: xstring:1741
path()
Definition: filesystem:852
string_type _Mystr
Definition: filesystem:1492
path experimental::filesystem::v1::path::stem ( ) const
inline
1373  { // pick off stem (basename) in filename (leaf) before dot
1374  string_type _Str0 = filename().native();
1375  string_type _Str1 = extension().native();
1376  _Str0.resize(_Str0.size() - _Str1.size());
1377  return (path(_Str0));
1378  }
path extension() const
Definition: filesystem:1380
path filename() const
Definition: filesystem:1367
path()
Definition: filesystem:852
const string_type & native() const _NOEXCEPT
Definition: filesystem:1179
basic_string< value_type > string_type
Definition: filesystem:849
void resize(size_type _Newsize)
Definition: xstring:1774
template<class _Elem , class _Traits = char_traits<_Elem>, class _Alloc = allocator<_Elem>>
basic_string<_Elem, _Traits, _Alloc> experimental::filesystem::v1::path::string ( const _Alloc &  _Al = _Alloc()) const
inline
1199  { // return path as basic_string<_Elem, _Traits, _Alloc>
1201  return (_Path_cvt<value_type, _Elem>::
1202  _Cvt(_Str, _Mystr.c_str(), _Mystr.size()));
1203  }
const _Elem * c_str() const _NOEXCEPT
Definition: xstring:1741
string_type _Mystr
Definition: filesystem:1492
size_type size() const _NOEXCEPT
Definition: xstring:1763
Definition: xstring:21
_STD string experimental::filesystem::v1::path::string ( ) const
inline
1206  { // return path as basic_string<char> native
1207  _STD string _Str;
1208  return (_Path_cvt<value_type, char>::
1209  _Cvt(_Str, _Mystr.c_str(), _Mystr.size()));
1210  }
const _Elem * c_str() const _NOEXCEPT
Definition: xstring:1741
string_type _Mystr
Definition: filesystem:1492
size_type size() const _NOEXCEPT
Definition: xstring:1763
void experimental::filesystem::v1::path::swap ( path _Right)
inline
1174  { // swap the stored strings
1175  _Mystr.swap(_Right._Mystr);
1176  }
void swap(_Myt &_Right) _NOEXCEPT_OP(_Alty
Definition: xstring:1854
string_type _Mystr
Definition: filesystem:1492
constexpr const _Ty &() _Right
Definition: algorithm:3591
_STD u16string experimental::filesystem::v1::path::u16string ( ) const
inline
1228  { // return path as basic_string<char16_t> UTF16
1229  _STD u16string _Str;
1230  return (_Path_cvt<value_type, char16_t>::
1231  _Cvt(_Str, _Mystr.c_str(), _Mystr.size()));
1232  }
const _Elem * c_str() const _NOEXCEPT
Definition: xstring:1741
string_type _Mystr
Definition: filesystem:1492
size_type size() const _NOEXCEPT
Definition: xstring:1763
Definition: xstring:21
_STD u32string experimental::filesystem::v1::path::u32string ( ) const
delete
_STD string experimental::filesystem::v1::path::u8string ( ) const
inline
1220  { // return path as basic_string<char> UTF8
1221  _STD string _Str;
1222  return (_Path_cvt<value_type, char8_t,
1224  _Cvt(_Str, _Mystr.c_str(), _Mystr.size()));
1225  }
Definition: iosfwd:612
const _Elem * c_str() const _NOEXCEPT
Definition: xstring:1741
Definition: iosfwd:505
string_type _Mystr
Definition: filesystem:1492
size_type size() const _NOEXCEPT
Definition: xstring:1763
_Pchar value_type
Definition: filesystem:848
_STD wstring experimental::filesystem::v1::path::wstring ( ) const
inline
1213  { // return path as basic_string<wchar_t> native
1214  _STD wstring _Str;
1215  return (_Path_cvt<value_type, wchar_t>::
1216  _Cvt(_Str, _Mystr.c_str(), _Mystr.size()));
1217  }
const _Elem * c_str() const _NOEXCEPT
Definition: xstring:1741
string_type _Mystr
Definition: filesystem:1492
size_type size() const _NOEXCEPT
Definition: xstring:1763
Definition: xstring:21

Member Data Documentation

string_type experimental::filesystem::v1::path::_Mystr
constexpr value_type experimental::filesystem::v1::path::preferred_separator = _FS_PREF
static

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