[fs.path.native.obs]

# 31 Input/output library [[input.output]](./#input.output)

## 31.12 File systems [[filesystems]](filesystems#fs.path.native.obs)

### 31.12.6 Class path [[fs.class.path]](fs.class.path#fs.path.native.obs)

#### 31.12.6.5 Members [[fs.path.member]](fs.path.member#fs.path.native.obs)

#### 31.12.6.5.6 Native format observers [fs.path.native.obs]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L14630)

The string returned by all native format observers is in the native pathname format ([[fs.class.path]](fs.class.path "31.12.6 Class path"))[.](#1.sentence-1)

[ð](#lib:native,path)

`const string_type& native() const noexcept;
`

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L14639)

*Returns*: The pathname in the native format[.](#2.sentence-1)

[ð](#lib:c_str,path)

`const value_type* c_str() const noexcept;
`

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L14650)

*Effects*: Equivalent to: return native().c_str();

[ð](#lib:operator_string_type,path)

`operator string_type() const;
`

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L14661)

*Returns*: native()[.](#4.sentence-1)

[ð](#lib:string,path)

`template<class EcharT, class traits = char_traits<EcharT>, class Allocator = allocator<EcharT>>
  basic_string<EcharT, traits, Allocator> string(const Allocator& a = Allocator()) const;
`

[5](#5)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L14673)

*Returns*: native()[.](#5.sentence-1)

[6](#6)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L14677)

*Remarks*: All memory allocation, including for the return value, shall
be performed by a[.](#6.sentence-1)

Conversion, if any, is specified by[[fs.path.cvt]](fs.path.cvt "31.12.6.3 Conversions")[.](#6.sentence-2)

[ð](#lib:system_encoded_string,path)

`std::string system_encoded_string() const;
std::wstring wstring() const;
std::u8string u8string() const;
std::u16string u16string() const;
std::u32string u32string() const;
`

[7](#7)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L14698)

*Returns*: native()[.](#7.sentence-1)

[8](#8)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L14702)

*Remarks*: Conversion, if any, is performed as specified
by [[fs.path.cvt]](fs.path.cvt "31.12.6.3 Conversions")[.](#8.sentence-1)

[ð](#lib:display_string,path)

`std::string display_string() const;
`

[9](#9)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L14714)

*Returns*: format("{}", *this)[.](#9.sentence-1)

[*Note [1](#note-1)*:

The returned string is suitable for use with formatting ([[format.functions]](format.functions "28.5.5 Formatting functions"))
and print functions ([[print.fun]](print.fun "31.7.10 Print functions"))[.](#9.sentence-2)

â *end note*]
