[fs.path.query]

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

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

### 31.12.6 Class path [[fs.class.path]](fs.class.path#fs.path.query)

#### 31.12.6.5 Members [[fs.path.member]](fs.path.member#fs.path.query)

#### 31.12.6.5.10 Query [fs.path.query]

[ð](#lib:empty,path)

`bool empty() const noexcept;
`

[1](#1)

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

*Returns*: true if the pathname in the generic format is empty, otherwise false[.](#1.sentence-1)

[ð](#lib:has_root_path,path)

`bool has_root_path() const;
`

[2](#2)

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

*Returns*: !root_path().empty()[.](#2.sentence-1)

[ð](#lib:has_root_name,path)

`bool has_root_name() const;
`

[3](#3)

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

*Returns*: !root_name().empty()[.](#3.sentence-1)

[ð](#lib:has_root_directory,path)

`bool has_root_directory() const;
`

[4](#4)

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

*Returns*: !root_directory().empty()[.](#4.sentence-1)

[ð](#lib:has_relative_path,path)

`bool has_relative_path() const;
`

[5](#5)

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

*Returns*: !relative_path().empty()[.](#5.sentence-1)

[ð](#lib:has_parent_path,path)

`bool has_parent_path() const;
`

[6](#6)

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

*Returns*: !parent_path().empty()[.](#6.sentence-1)

[ð](#lib:has_filename,path)

`bool has_filename() const;
`

[7](#7)

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

*Returns*: !filename().empty()[.](#7.sentence-1)

[ð](#lib:has_stem,path)

`bool has_stem() const;
`

[8](#8)

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

*Returns*: !stem().empty()[.](#8.sentence-1)

[ð](#lib:has_extension,path)

`bool has_extension() const;
`

[9](#9)

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

*Returns*: !extension().empty()[.](#9.sentence-1)

[ð](#lib:is_absolute,path)

`bool is_absolute() const;
`

[10](#10)

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

*Returns*: true if the pathname in the native format
 contains an absolute path ([[fs.class.path]](fs.class.path "31.12.6 Class path")), otherwise false[.](#10.sentence-1)

[11](#11)

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

[*Example [1](#example-1)*:

path("/").is_absolute() is true for POSIX-based operating systems, and false for Windows-based
operating systems[.](#11.sentence-1)

â *end example*]

[ð](#lib:is_relative,path)

`bool is_relative() const;
`

[12](#12)

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

*Returns*: !is_absolute()[.](#12.sentence-1)
