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 _Elem >
pathconcat (const _Elem *_Ptr)
 
template<class _InIt , enable_if_t< _Is_iterator< _InIt >::value, int > = 0>
pathconcat (_InIt _First)
 
template<class _Elem , enable_if_t<!_Is_iterator< _Elem >::value, int > = 0>
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
 
_Ret_z_ 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
846  { // default construct
847  }
experimental::filesystem::v1::path::path ( const path _Right)
inline
850  : _Mystr(_Right._Mystr)
851  { // copy construct
852  }
string_type _Mystr
Definition: filesystem:1484
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _InIt , class = typename enable_if<_Is_iterator<_InIt>::value, void>::type>
experimental::filesystem::v1::path::path ( _InIt  _First,
_InIt  _Last 
)
inline
861  { // construct from [_First, _Last), given iterators
862  typedef _Iter_value_t<_InIt> _Valty;
863  basic_string<_Valty> _Str(_First, _Last);
864  string_type _Str_out;
866  _Cvt(_Str_out, _Str.c_str(), _Str.size());
867  }
static _Outstr && _Cvt(_Outstr &_Str, const _Inchar *_First, size_t _Size, _Unused_locale={})
Definition: filesystem:209
typename iterator_traits< _Iter >::value_type _Iter_value_t
Definition: xutility:649
basic_string< value_type > string_type
Definition: filesystem:842
Definition: xstring:1866
_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
874  { // construct from NTCTS, given iterator
875  typedef _Iter_value_t<_InIt> _Valty;
877  for (; *_First != _Valty(0); ++_First)
878  _Str += *_First;
879  string_type _Str_out;
881  _Cvt(_Str_out, _Str.c_str(), _Str.size());
882  }
_Ret_z_ const _Elem * c_str() const _NOEXCEPT
Definition: xstring:3001
static _Outstr && _Cvt(_Outstr &_Str, const _Inchar *_First, size_t _Size, _Unused_locale={})
Definition: filesystem:209
typename iterator_traits< _Iter >::value_type _Iter_value_t
Definition: xutility:649
size_type size() const _NOEXCEPT
Definition: xstring:3023
basic_string< value_type > string_type
Definition: filesystem:842
Definition: xstring:1866
template<class _Elem , class _Traits , class _Alloc >
experimental::filesystem::v1::path::path ( const basic_string< _Elem, _Traits, _Alloc > &  _Str)
inline
888  { // construct from arbitrary source string
889  string_type _Str_out;
891  _Cvt(_Str_out, _Str.c_str(), _Str.size());
892  }
_Ret_z_ const _Elem * c_str() const _NOEXCEPT
Definition: xstring:3001
static _Outstr && _Cvt(_Outstr &_Str, const _Inchar *_First, size_t _Size, _Unused_locale={})
Definition: filesystem:209
size_type size() const _NOEXCEPT
Definition: xstring:3023
basic_string< value_type > string_type
Definition: filesystem:842
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
902  { // construct from [_First, _Last), given iterators
903  typedef _Iter_value_t<_InIt> _Valty;
904  basic_string<_Valty> _Str(_First, _Last);
905  string_type _Str_out;
907  _Cvt(_Str_out, _Str.c_str(), _Str.size(), _Loc);
908  }
static _Outstr && _Cvt(_Outstr &_Str, const _Inchar *_First, size_t _Size, _Unused_locale={})
Definition: filesystem:209
typename iterator_traits< _Iter >::value_type _Iter_value_t
Definition: xutility:649
basic_string< value_type > string_type
Definition: filesystem:842
Definition: xstring:1866
_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
916  { // construct from NTCTS, given iterator
917  typedef _Iter_value_t<_InIt> _Valty;
919  for (; *_First != _Valty(0); ++_First)
920  _Str += *_First;
921  string_type _Str_out;
923  _Cvt(_Str_out, _Str.c_str(), _Str.size(), _Loc);
924  }
_Ret_z_ const _Elem * c_str() const _NOEXCEPT
Definition: xstring:3001
static _Outstr && _Cvt(_Outstr &_Str, const _Inchar *_First, size_t _Size, _Unused_locale={})
Definition: filesystem:209
typename iterator_traits< _Iter >::value_type _Iter_value_t
Definition: xutility:649
size_type size() const _NOEXCEPT
Definition: xstring:3023
basic_string< value_type > string_type
Definition: filesystem:842
Definition: xstring:1866
template<class _Elem , class _Traits , class _Alloc >
experimental::filesystem::v1::path::path ( const basic_string< _Elem, _Traits, _Alloc > &  _Str,
const locale _Loc 
)
inline
931  { // construct from arbitrary source string
932  string_type _Str_out;
934  _Cvt(_Str_out, _Str.c_str(), _Str.size(), _Loc);
935  }
_Ret_z_ const _Elem * c_str() const _NOEXCEPT
Definition: xstring:3001
static _Outstr && _Cvt(_Outstr &_Str, const _Inchar *_First, size_t _Size, _Unused_locale={})
Definition: filesystem:209
size_type size() const _NOEXCEPT
Definition: xstring:3023
basic_string< value_type > string_type
Definition: filesystem:842
experimental::filesystem::v1::path::path ( path &&  _Right)
inline
938  : _Mystr(_STD move(_Right._Mystr))
939  { // move construct
940  }
string_type _Mystr
Definition: filesystem:1484
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1349
constexpr const _Ty &() _Right
Definition: algorithm:3723
experimental::filesystem::v1::path::~path ( )
inline
949  { // destroy the object
950  }

Member Function Documentation

string_type experimental::filesystem::v1::path::_Make_generic ( ) const
inline
1238  { // copy and convert any '\' to '/'
1239  string_type _Str = _Mystr;
1240  _STD replace(_Str.begin(), _Str.end(), _FS_BSLASH, _FS_SLASH);
1241  return (_Str);
1242  }
#define _FS_BSLASH
Definition: filesystem:39
void replace(_FwdIt _First, _FwdIt _Last, const _Ty &_Oldval, const _Ty &_Newval)
Definition: algorithm:1088
#define _FS_SLASH
Definition: filesystem:38
string_type _Mystr
Definition: filesystem:1484
basic_string< value_type > string_type
Definition: filesystem:842
size_t experimental::filesystem::v1::path::_Prefix_end ( ) const
inline
1453  { // get end of prefix
1454  if (2 < _Mystr.size()
1455  && _FS_ISSEP(_Mystr[0])
1456  && _FS_ISSEP(_Mystr[1])
1457  && !_FS_ISSEP(_Mystr[2]))
1458  { // network name, pick off \\name
1459  size_t _Idx = 3;
1460  for (; _Idx < _Mystr.size() && !_FS_ISSEP(_Mystr[_Idx]); ++_Idx)
1461  ;
1462  return (_Idx);
1463  }
1464  else
1465  { // no network name, pick off drive:
1466  size_t _Idx = _Mystr.find(_FS_COLON, 0);
1467  if (_Idx == _Mystr.npos)
1468  _Idx = 0;
1469  else
1470  ++_Idx;
1471  return (_Idx);
1472  }
1473  }
static _PGLOBAL const size_type npos
Definition: xstring:2219
#define _FS_ISSEP(x)
Definition: filesystem:33
string_type _Mystr
Definition: filesystem:1484
size_type size() const _NOEXCEPT
Definition: xstring:3023
#define _FS_COLON
Definition: filesystem:36
size_t experimental::filesystem::v1::path::_Root_end ( ) const
inline
1476  { // get end of root
1477  size_t _Idx = _Prefix_end();
1478  if (_Idx < _Mystr.size()
1479  && _FS_ISSEP(_Mystr[_Idx]))
1480  ++_Idx;
1481  return (_Idx);
1482  }
#define _FS_ISSEP(x)
Definition: filesystem:33
size_t _Prefix_end() const
Definition: filesystem:1452
string_type _Mystr
Definition: filesystem:1484
size_type size() const _NOEXCEPT
Definition: xstring:3023
template<class _InIt >
path& experimental::filesystem::v1::path::append ( _InIt  _First,
_InIt  _Last 
)
inline
1018  { // append NTCTS
1019  return (append(path(_First, _Last)._Mystr));
1020  }
path()
Definition: filesystem:845
string_type _Mystr
Definition: filesystem:1484
_FwdIt _Last
Definition: algorithm:1936
path & append(_InIt _First, _InIt _Last)
Definition: filesystem:1017
template<class _InIt >
path& experimental::filesystem::v1::path::append ( _InIt  _First)
inline
1024  { // append NTCTS
1025  return (append(path(_First)._Mystr));
1026  }
path()
Definition: filesystem:845
string_type _Mystr
Definition: filesystem:1484
path & append(_InIt _First, _InIt _Last)
Definition: filesystem:1017
template<class _Elem , class _Traits , class _Alloc >
path& experimental::filesystem::v1::path::append ( const basic_string< _Elem, _Traits, _Alloc > &  _Str0)
inline
1033  { // append arbitrary source string
1034  string_type _Str(_Str0.begin(), _Str0.end()); // avoid overlap
1035 
1036  for (size_t _Idx = 0; _Idx < _Str.size(); ++_Idx)
1037  if (_Str[_Idx] == _FS_SLASH)
1038  _Str[_Idx] = _FS_PREF; // convert '/' to '\'
1039 
1040  if (0 < _Mystr.size() && 0 < _Str.size()
1041  && _Mystr.back() != _FS_COLON
1042  && !_FS_ISSEP(_Mystr.back())
1043  && !_FS_ISSEP(_Str[0]))
1044  _Mystr.append(1, _FS_PREF); // add needed separator
1045 
1046  _Mystr.append(_Str);
1047  return (*this);
1048  }
reference back()
Definition: xstring:2991
#define _FS_ISSEP(x)
Definition: filesystem:33
_Myt & append(initializer_list< _Elem > _Ilist)
Definition: xstring:2199
#define _FS_SLASH
Definition: filesystem:38
iterator end() _NOEXCEPT
Definition: xstring:2869
string_type _Mystr
Definition: filesystem:1484
iterator begin() _NOEXCEPT
Definition: xstring:2857
size_type size() const _NOEXCEPT
Definition: xstring:3023
basic_string< value_type > string_type
Definition: filesystem:842
#define _FS_COLON
Definition: filesystem:36
#define _FS_PREF
Definition: filesystem:34
template<class _InIt >
path& experimental::filesystem::v1::path::assign ( _InIt  _First,
_InIt  _Last 
)
inline
976  { // assign from [_First, _Last), given iterators
977  return (*this = path(_First, _Last));
978  }
path()
Definition: filesystem:845
_FwdIt _Last
Definition: algorithm:1936
template<class _InIt >
path& experimental::filesystem::v1::path::assign ( _InIt  _First)
inline
982  { // assign from NTCTS
983  return (*this = path(_First));
984  }
path()
Definition: filesystem:845
template<class _Elem , class _Traits , class _Alloc >
path& experimental::filesystem::v1::path::assign ( const basic_string< _Elem, _Traits, _Alloc > &  _Str)
inline
991  { // assign from arbitrary source string
992  return (*this = path(_Str));
993  }
path()
Definition: filesystem:845
iterator experimental::filesystem::v1::path::begin ( ) const
inline
1443  { // get beginning of path
1444  return (iterator(*this, (size_t)0));
1445  }
_Path_iterator< path > iterator
Definition: filesystem:1439
_Ret_z_ const value_type* experimental::filesystem::v1::path::c_str ( ) const
inline
1177  { // get the stored string
1178  return (_Mystr.c_str());
1179  }
_Ret_z_ const _Elem * c_str() const _NOEXCEPT
Definition: xstring:3001
string_type _Mystr
Definition: filesystem:1484
void experimental::filesystem::v1::path::clear ( )
inline
1115  { // clear the stored string
1116  _Mystr.clear();
1117  }
string_type _Mystr
Definition: filesystem:1484
void clear() _NOEXCEPT
Definition: xstring:2624
int experimental::filesystem::v1::path::compare ( const path _Path) const
inline
1301  { // compare native() to _Path.native()
1302  return (_Mystr.compare(_Path._Mystr));
1303  }
_In_z_ wchar_t const * _Path
Definition: corecrt_wstdlib.h:337
string_type _Mystr
Definition: filesystem:1484
int experimental::filesystem::v1::path::compare ( const string_type _Str) const
inline
1306  { // compare native() to string
1307  return (_Mystr.compare(_Str));
1308  }
string_type _Mystr
Definition: filesystem:1484
int experimental::filesystem::v1::path::compare ( const value_type _Ptr) const
inline
1311  { // compare native() to NTCS
1312  return (_Mystr.compare(_Ptr));
1313  }
string_type _Mystr
Definition: filesystem:1484
template<class _InIt >
path& experimental::filesystem::v1::path::concat ( _InIt  _First,
_InIt  _Last 
)
inline
1079  { // concatenate NTCTS
1080  return (concat(path(_First, _Last)._Mystr));
1081  }
path & concat(_InIt _First, _InIt _Last)
Definition: filesystem:1078
path()
Definition: filesystem:845
string_type _Mystr
Definition: filesystem:1484
_FwdIt _Last
Definition: algorithm:1936
template<class _Elem >
path& experimental::filesystem::v1::path::concat ( const _Elem *  _Ptr)
inline
1085  { // concatenate arbitrary NTCTS
1086  return (concat(basic_string<_Elem>(_Ptr)));
1087  }
path & concat(_InIt _First, _InIt _Last)
Definition: filesystem:1078
Definition: xstring:1866
template<class _InIt , enable_if_t< _Is_iterator< _InIt >::value, int > = 0>
path& experimental::filesystem::v1::path::concat ( _InIt  _First)
inline
1092  { // concatenate NTCTS
1093  return (concat(path(_First)._Mystr));
1094  }
path & concat(_InIt _First, _InIt _Last)
Definition: filesystem:1078
path()
Definition: filesystem:845
string_type _Mystr
Definition: filesystem:1484
template<class _Elem , enable_if_t<!_Is_iterator< _Elem >::value, int > = 0>
path& experimental::filesystem::v1::path::concat ( _Elem  _Val)
inline
1099  { // concatenate element
1100  return (concat(path(basic_string<_Elem>((size_t)1, _Val))._Mystr));
1101  }
path & concat(_InIt _First, _InIt _Last)
Definition: filesystem:1078
path()
Definition: filesystem:845
string_type _Mystr
Definition: filesystem:1484
Definition: xstring:1866
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Elem , class _Traits , class _Alloc >
path& experimental::filesystem::v1::path::concat ( const basic_string< _Elem, _Traits, _Alloc > &  _Str)
inline
1108  { // concatenate arbitrary source string
1109  _Mystr.append(_Str.begin(), _Str.end());
1110  return (*this);
1111  }
_Myt & append(initializer_list< _Elem > _Ilist)
Definition: xstring:2199
iterator end() _NOEXCEPT
Definition: xstring:2869
string_type _Mystr
Definition: filesystem:1484
iterator begin() _NOEXCEPT
Definition: xstring:2857
bool experimental::filesystem::v1::path::empty ( ) const
inline
1384  { // test if stored string is empty
1385  return (_Mystr.empty());
1386  }
string_type _Mystr
Definition: filesystem:1484
bool empty() const _NOEXCEPT
Definition: xstring:3090
iterator experimental::filesystem::v1::path::end ( ) const
inline
1448  { // get end of path
1449  return (iterator(*this, _Mystr.size()));
1450  }
_Path_iterator< path > iterator
Definition: filesystem:1439
string_type _Mystr
Definition: filesystem:1484
size_type size() const _NOEXCEPT
Definition: xstring:3023
path experimental::filesystem::v1::path::extension ( ) const
inline
1373  { // pick off .extension in filename (leaf), including dot
1374  string_type _Str = filename().native();
1375  size_t _Idx = _Str.rfind(_FS_PERIOD);
1376  return (_Idx == string_type::npos // no .
1377  || _Str.size() == 1 // only .
1378  || (_Str.size() == 2 && _Str[0] == _FS_PERIOD
1379  && _Str[1] == _FS_PERIOD) // only ..
1380  ? path() : path(_Str.substr(_Idx)));
1381  }
static _PGLOBAL const size_type npos
Definition: xstring:2219
path filename() const
Definition: filesystem:1359
path()
Definition: filesystem:845
#define _FS_PERIOD
Definition: filesystem:37
const string_type & native() const _NOEXCEPT
Definition: filesystem:1171
basic_string< value_type > string_type
Definition: filesystem:842
path experimental::filesystem::v1::path::filename ( ) const
inline
1360  { // get filename (leaf)
1361  return (empty() ? path() : path(*--end()));
1362  }
bool empty() const _NOEXCEPT
Definition: filesystem:1383
path()
Definition: filesystem:845
iterator end() const
Definition: filesystem:1447
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
1249  { // return path as basic_string<_Elem, _Traits, _Alloc>
1251  const string_type _Genstr = _Make_generic();
1252  return (_Path_cvt<value_type, _Elem>::
1253  _Cvt(_Str, _Genstr.c_str(), _Genstr.size()));
1254  }
string_type _Make_generic() const
Definition: filesystem:1237
basic_string< value_type > string_type
Definition: filesystem:842
Definition: xstring:1866
_STD string experimental::filesystem::v1::path::generic_string ( ) const
inline
1257  { // return path as basic_string<char> native
1258  _STD string _Str;
1259  const string_type _Genstr = _Make_generic();
1260  return (_Path_cvt<value_type, char>::
1261  _Cvt(_Str, _Genstr.c_str(), _Genstr.size()));
1262  }
string_type _Make_generic() const
Definition: filesystem:1237
basic_string< value_type > string_type
Definition: filesystem:842
_STD u16string experimental::filesystem::v1::path::generic_u16string ( ) const
inline
1282  { // return path as basic_string<char16_t> UTF16
1283  _STD u16string _Str;
1284  const string_type _Genstr = _Make_generic();
1285  return (_Path_cvt<value_type, char16_t>::
1286  _Cvt(_Str, _Genstr.c_str(), _Genstr.size()));
1287  }
string_type _Make_generic() const
Definition: filesystem:1237
basic_string< value_type > string_type
Definition: filesystem:842
Definition: xstring:1866
_STD u32string experimental::filesystem::v1::path::generic_u32string ( ) const
delete
_STD string experimental::filesystem::v1::path::generic_u8string ( ) const
inline
1273  { // return path as basic_string<char> UTF8
1274  _STD string _Str;
1275  const string_type _Genstr = _Make_generic();
1276  return (_Path_cvt<value_type, char8_t,
1278  _Cvt(_Str, _Genstr.c_str(), _Genstr.size()));
1279  }
string_type _Make_generic() const
Definition: filesystem:1237
Definition: iosfwd:558
Definition: iosfwd:463
basic_string< value_type > string_type
Definition: filesystem:842
_Pchar value_type
Definition: filesystem:841
_STD wstring experimental::filesystem::v1::path::generic_wstring ( ) const
inline
1265  { // return path as basic_string<wchar_t> native
1266  _STD wstring _Str;
1267  const string_type _Genstr = _Make_generic();
1268  return (_Path_cvt<value_type, wchar_t>::
1269  _Cvt(_Str, _Genstr.c_str(), _Genstr.size()));
1270  }
string_type _Make_generic() const
Definition: filesystem:1237
basic_string< value_type > string_type
Definition: filesystem:842
Definition: xstring:1866
bool experimental::filesystem::v1::path::has_extension ( ) const
inline
1424  { // test if extension is nonempty
1425  return (!extension().empty());
1426  }
bool empty() const _NOEXCEPT
Definition: filesystem:1383
path extension() const
Definition: filesystem:1372
bool experimental::filesystem::v1::path::has_filename ( ) const
inline
1414  { // test if filename (leaf) is nonempty
1415  return (!filename().empty());
1416  }
bool empty() const _NOEXCEPT
Definition: filesystem:1383
path filename() const
Definition: filesystem:1359
bool experimental::filesystem::v1::path::has_parent_path ( ) const
inline
1409  { // test if parent (branch) path is nonempty
1410  return (!parent_path().empty());
1411  }
bool empty() const _NOEXCEPT
Definition: filesystem:1383
path parent_path() const
Definition: filesystem:1347
bool experimental::filesystem::v1::path::has_relative_path ( ) const
inline
1404  { // test if relative path is nonempty
1405  return (!relative_path().empty());
1406  }
bool empty() const _NOEXCEPT
Definition: filesystem:1383
path relative_path() const
Definition: filesystem:1337
bool experimental::filesystem::v1::path::has_root_directory ( ) const
inline
1394  { // test if root directory is nonempty
1395  return (!root_directory().empty());
1396  }
bool empty() const _NOEXCEPT
Definition: filesystem:1383
path root_directory() const
Definition: filesystem:1321
bool experimental::filesystem::v1::path::has_root_name ( ) const
inline
1389  { // test if root name is nonempty
1390  return (!root_name().empty());
1391  }
bool empty() const _NOEXCEPT
Definition: filesystem:1383
path root_name() const
Definition: filesystem:1316
bool experimental::filesystem::v1::path::has_root_path ( ) const
inline
1399  { // test if root path is nonempty
1400  return (!root_path().empty());
1401  }
bool empty() const _NOEXCEPT
Definition: filesystem:1383
path root_path() const
Definition: filesystem:1331
bool experimental::filesystem::v1::path::has_stem ( ) const
inline
1419  { // test if stem (basename) is nonempty
1420  return (!stem().empty());
1421  }
bool empty() const _NOEXCEPT
Definition: filesystem:1383
path stem() const
Definition: filesystem:1364
bool experimental::filesystem::v1::path::is_absolute ( ) const
inline
1429  { // test if path is absolute
1430  return (has_root_name() && has_root_directory());
1431  }
bool has_root_name() const
Definition: filesystem:1388
bool has_root_directory() const
Definition: filesystem:1393
bool experimental::filesystem::v1::path::is_relative ( ) const
inline
1434  { // test if path is relative
1435  return (!is_absolute());
1436  }
bool is_absolute() const
Definition: filesystem:1428
path& experimental::filesystem::v1::path::make_preferred ( )
inline
1120  { // convert any '/' to '\'
1121  for (size_t _Idx = 0; _Idx < _Mystr.size(); ++_Idx)
1122 
1123  if (_Mystr[_Idx] == _FS_SLASH)
1124  _Mystr[_Idx] = _FS_BSLASH;
1125 
1126  return (*this);
1127  }
#define _FS_BSLASH
Definition: filesystem:39
#define _FS_SLASH
Definition: filesystem:38
string_type _Mystr
Definition: filesystem:1484
size_type size() const _NOEXCEPT
Definition: xstring:3023
const string_type& experimental::filesystem::v1::path::native ( ) const
inline
1172  { // get the stored string
1173  return (_Mystr);
1174  }
string_type _Mystr
Definition: filesystem:1484
experimental::filesystem::v1::path::operator string_type ( ) const
inline
1182  { // convert to file string
1183  return (_Mystr);
1184  }
string_type _Mystr
Definition: filesystem:1484
path& experimental::filesystem::v1::path::operator+= ( const path _Path)
inline
1052  { // concatenate copy
1053  return (concat(_Path._Mystr));
1054  }
path & concat(_InIt _First, _InIt _Last)
Definition: filesystem:1078
_In_z_ wchar_t const * _Path
Definition: corecrt_wstdlib.h:337
template<class _Ty >
path& experimental::filesystem::v1::path::operator+= ( _Ty  _Val)
inline
1058  { // concatenate NTCTS, given iterator/element
1059  return (concat(_Val));
1060  }
path & concat(_InIt _First, _InIt _Last)
Definition: filesystem:1078
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Elem , class _Traits , class _Alloc >
path& experimental::filesystem::v1::path::operator+= ( const basic_string< _Elem, _Traits, _Alloc > &  _Str)
inline
1067  { // concatenate arbitrary source string
1068  return (concat(_Str));
1069  }
path & concat(_InIt _First, _InIt _Last)
Definition: filesystem:1078
template<class _Elem >
path& experimental::filesystem::v1::path::operator+= ( const _Elem *  _Ptr)
inline
1073  { // concatenate arbitrary NTCTS
1074  return (concat(basic_string<_Elem>(_Ptr)));
1075  }
path & concat(_InIt _First, _InIt _Last)
Definition: filesystem:1078
Definition: xstring:1866
path& experimental::filesystem::v1::path::operator/= ( const path _Path)
inline
997  { // append copy
998  return (append(_Path._Mystr));
999  }
_In_z_ wchar_t const * _Path
Definition: corecrt_wstdlib.h:337
path & append(_InIt _First, _InIt _Last)
Definition: filesystem:1017
template<class _InIt >
path& experimental::filesystem::v1::path::operator/= ( _InIt  _First)
inline
1003  { // append NTCTS, given iterator
1004  return (append(path(_First)._Mystr));
1005  }
path()
Definition: filesystem:845
string_type _Mystr
Definition: filesystem:1484
path & append(_InIt _First, _InIt _Last)
Definition: filesystem:1017
template<class _Elem , class _Traits , class _Alloc >
path& experimental::filesystem::v1::path::operator/= ( const basic_string< _Elem, _Traits, _Alloc > &  _Str)
inline
1012  { // append arbitrary source string
1013  return (append(_Str));
1014  }
path & append(_InIt _First, _InIt _Last)
Definition: filesystem:1017
path& experimental::filesystem::v1::path::operator= ( path &&  _Right)
inline
943  { // move assign
944  _Mystr = _STD move(_Right._Mystr);
945  return (*this);
946  }
string_type _Mystr
Definition: filesystem:1484
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1349
constexpr const _Ty &() _Right
Definition: algorithm:3723
path& experimental::filesystem::v1::path::operator= ( const path _Right)
inline
954  { // assign copy
955  _Mystr = _Right._Mystr;
956  return (*this);
957  }
string_type _Mystr
Definition: filesystem:1484
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _InIt >
path& experimental::filesystem::v1::path::operator= ( _InIt  _First)
inline
961  { // assign from NTCTS, given iterator
962  return (*this = path(_First));
963  }
path()
Definition: filesystem:845
template<class _Elem , class _Traits , class _Alloc >
path& experimental::filesystem::v1::path::operator= ( const basic_string< _Elem, _Traits, _Alloc > &  _Str)
inline
970  { // assign from arbitrary source string
971  return (*this = path(_Str));
972  }
path()
Definition: filesystem:845
path experimental::filesystem::v1::path::parent_path ( ) const
inline
1348  { // get parent (branch) path
1349  path _Ans;
1350  if (!empty())
1351  { // append all but last element
1352  iterator _End = --end();
1353  for (iterator _Next = begin(); _Next != _End; ++_Next)
1354  _Ans /= *_Next;
1355  }
1356  return (_Ans);
1357  }
bool empty() const _NOEXCEPT
Definition: filesystem:1383
_Path_iterator< path > iterator
Definition: filesystem:1439
path()
Definition: filesystem:845
iterator begin() const
Definition: filesystem:1442
iterator end() const
Definition: filesystem:1447
path experimental::filesystem::v1::path::relative_path ( ) const
inline
1338  { // get relative path
1339  size_t _Idx = _Root_end();
1340  while (_Idx < _Mystr.size()
1341  && _FS_ISSEP(_Mystr[_Idx]))
1342  ++_Idx; // skip extra '/' after root
1343 
1344  return (path(_Mystr.substr(_Idx)));
1345  }
#define _FS_ISSEP(x)
Definition: filesystem:33
size_t _Root_end() const
Definition: filesystem:1475
path()
Definition: filesystem:845
string_type _Mystr
Definition: filesystem:1484
size_type size() const _NOEXCEPT
Definition: xstring:3023
path& experimental::filesystem::v1::path::remove_filename ( )
inline
1130  { // remove filename (leaf)
1131  if (!empty() && begin() != --end())
1132  { // leaf to remove, back up over it
1133  size_t _Rend = _Root_end();
1134  size_t _Idx = _Mystr.size();
1135 
1136  for (; _Rend < _Idx; --_Idx)
1137  if (_FS_ISSEP(_Mystr[_Idx - 1]))
1138  break; // back up over stuff at end
1139  for (; _Rend < _Idx; --_Idx)
1140  if (!_FS_ISSEP(_Mystr[_Idx - 1]))
1141  break; // back up over trailing non-root slashes
1142  _Mystr.erase(_Idx);
1143  }
1144  return (*this);
1145  }
bool empty() const _NOEXCEPT
Definition: filesystem:1383
#define _FS_ISSEP(x)
Definition: filesystem:33
size_t _Root_end() const
Definition: filesystem:1475
_Myt & erase(const size_type _Off=0)
Definition: xstring:2584
iterator begin() const
Definition: filesystem:1442
string_type _Mystr
Definition: filesystem:1484
size_type size() const _NOEXCEPT
Definition: xstring:3023
iterator end() const
Definition: filesystem:1447
path& experimental::filesystem::v1::path::replace_extension ( const path _Newext = path())
inline
1155  { // replace extension with _Newext
1156  if (_Newext.empty() || _Newext.c_str()[0] == _FS_PERIOD)
1157  *this = parent_path()
1158  / path((stem().native() + _Newext.native()));
1159  else
1160  *this = parent_path()
1161  / path((stem().native() + _FS_PERIOD + _Newext.native()));
1162  return (*this);
1163  }
path stem() const
Definition: filesystem:1364
path()
Definition: filesystem:845
#define _FS_PERIOD
Definition: filesystem:37
const string_type & native() const _NOEXCEPT
Definition: filesystem:1171
path parent_path() const
Definition: filesystem:1347
path& experimental::filesystem::v1::path::replace_filename ( const path _Path)
inline
1148  { // replace filename
1149  remove_filename();
1150  *this /= _Path;
1151  return (*this);
1152  }
_In_z_ wchar_t const * _Path
Definition: corecrt_wstdlib.h:337
path & remove_filename()
Definition: filesystem:1129
path experimental::filesystem::v1::path::root_directory ( ) const
inline
1322  { // get root directory
1323  size_t _Idx = _Prefix_end();
1324  if (_Idx < _Mystr.size()
1325  && _FS_ISSEP(_Mystr[_Idx]))
1326  return (path(string_type(1, _FS_PREF)));
1327  else
1328  return (path());
1329  }
#define _FS_ISSEP(x)
Definition: filesystem:33
size_t _Prefix_end() const
Definition: filesystem:1452
path()
Definition: filesystem:845
string_type _Mystr
Definition: filesystem:1484
size_type size() const _NOEXCEPT
Definition: xstring:3023
basic_string< value_type > string_type
Definition: filesystem:842
#define _FS_PREF
Definition: filesystem:34
path experimental::filesystem::v1::path::root_name ( ) const
inline
1317  { // get root name
1318  return (path(_Mystr.substr(0, _Prefix_end())));
1319  }
size_t _Prefix_end() const
Definition: filesystem:1452
path()
Definition: filesystem:845
string_type _Mystr
Definition: filesystem:1484
path experimental::filesystem::v1::path::root_path ( ) const
inline
1332  { // get root path
1333  return (path(_Mystr.c_str(),
1334  _Mystr.c_str() + _Root_end()));
1335  }
_Ret_z_ const _Elem * c_str() const _NOEXCEPT
Definition: xstring:3001
size_t _Root_end() const
Definition: filesystem:1475
path()
Definition: filesystem:845
string_type _Mystr
Definition: filesystem:1484
path experimental::filesystem::v1::path::stem ( ) const
inline
1365  { // pick off stem (basename) in filename (leaf) before dot
1366  string_type _Str0 = filename().native();
1367  string_type _Str1 = extension().native();
1368  _Str0.resize(_Str0.size() - _Str1.size());
1369  return (path(_Str0));
1370  }
path extension() const
Definition: filesystem:1372
path filename() const
Definition: filesystem:1359
path()
Definition: filesystem:845
const string_type & native() const _NOEXCEPT
Definition: filesystem:1171
basic_string< value_type > string_type
Definition: filesystem:842
void resize(_CRT_GUARDOVERFLOW const size_type _Newsize)
Definition: xstring:3034
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
1191  { // return path as basic_string<_Elem, _Traits, _Alloc>
1193  return (_Path_cvt<value_type, _Elem>::
1194  _Cvt(_Str, _Mystr.c_str(), _Mystr.size()));
1195  }
_Ret_z_ const _Elem * c_str() const _NOEXCEPT
Definition: xstring:3001
string_type _Mystr
Definition: filesystem:1484
size_type size() const _NOEXCEPT
Definition: xstring:3023
Definition: xstring:1866
_STD string experimental::filesystem::v1::path::string ( ) const
inline
1198  { // return path as basic_string<char> native
1199  _STD string _Str;
1200  return (_Path_cvt<value_type, char>::
1201  _Cvt(_Str, _Mystr.c_str(), _Mystr.size()));
1202  }
_Ret_z_ const _Elem * c_str() const _NOEXCEPT
Definition: xstring:3001
string_type _Mystr
Definition: filesystem:1484
size_type size() const _NOEXCEPT
Definition: xstring:3023
void experimental::filesystem::v1::path::swap ( path _Right)
inline
1166  { // swap the stored strings
1167  _Mystr.swap(_Right._Mystr);
1168  }
string_type _Mystr
Definition: filesystem:1484
constexpr const _Ty &() _Right
Definition: algorithm:3723
_STD u16string experimental::filesystem::v1::path::u16string ( ) const
inline
1220  { // return path as basic_string<char16_t> UTF16
1221  _STD u16string _Str;
1222  return (_Path_cvt<value_type, char16_t>::
1223  _Cvt(_Str, _Mystr.c_str(), _Mystr.size()));
1224  }
_Ret_z_ const _Elem * c_str() const _NOEXCEPT
Definition: xstring:3001
string_type _Mystr
Definition: filesystem:1484
size_type size() const _NOEXCEPT
Definition: xstring:3023
Definition: xstring:1866
_STD u32string experimental::filesystem::v1::path::u32string ( ) const
delete
_STD string experimental::filesystem::v1::path::u8string ( ) const
inline
1212  { // return path as basic_string<char> UTF8
1213  _STD string _Str;
1214  return (_Path_cvt<value_type, char8_t,
1216  _Cvt(_Str, _Mystr.c_str(), _Mystr.size()));
1217  }
_Ret_z_ const _Elem * c_str() const _NOEXCEPT
Definition: xstring:3001
Definition: iosfwd:558
Definition: iosfwd:463
string_type _Mystr
Definition: filesystem:1484
size_type size() const _NOEXCEPT
Definition: xstring:3023
_Pchar value_type
Definition: filesystem:841
_STD wstring experimental::filesystem::v1::path::wstring ( ) const
inline
1205  { // return path as basic_string<wchar_t> native
1206  _STD wstring _Str;
1207  return (_Path_cvt<value_type, wchar_t>::
1208  _Cvt(_Str, _Mystr.c_str(), _Mystr.size()));
1209  }
_Ret_z_ const _Elem * c_str() const _NOEXCEPT
Definition: xstring:3001
string_type _Mystr
Definition: filesystem:1484
size_type size() const _NOEXCEPT
Definition: xstring:3023
Definition: xstring:1866

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: