std::experimental::filesystem::path::c_str,std::experimental::filesystem::path::native,std::experimental::filesystem::path::operatorstring_type() (3) - Linux Manuals
std::experimental::filesystem::path::c_str,std::experimental::filesystem::path::native,std::experimental::filesystem::path::operatorstring_type(): std::experimental::filesystem::path::c_str,std::experimental::filesystem::path::native,std::experimental::filesystem::path::operatorstring_type()
NAME
std::experimental::filesystem::path::c_str,std::experimental::filesystem::path::native,std::experimental::filesystem::path::operatorstring_type() - std::experimental::filesystem::path::c_str,std::experimental::filesystem::path::native,std::experimental::filesystem::path::operatorstring_type()
Synopsis
const value_type* c_str() const; (1) (filesystem TS)
const string_type& native() const; (2) (filesystem TS)
operator string_type() const; (3) (filesystem TS)
Accesses the native path name as a character string.
1) Equivalent to native().c_str().
2) Returns the native string representation of the pathname by reference.
3) Returns the native string representation of the pathname by value.
Parameters
(none)
Return value
The native string representation of the pathname, using native syntax, native character type, and native character encoding. This string is suitable for use with OS APIs.
Exceptions
1,2)
noexcept specification:
noexcept
Notes
The conversion function (3) is provided so that standard file-opening APIs that accept std::basic_string file names, such as the std::ifstream constructor, can use pathnames with no changes to code:
Example
// Run this code
Output:
See also
string
wstring returns the path in native pathname format converted to a string
u8string (public member function)
u16string
u32string
generic_string
generic_wstring returns the path in generic pathname format converted to a string
generic_u8string (public member function)
generic_u16string
generic_u32string