[fs.op.is.directory]

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

## 31.12 File systems [[filesystems]](filesystems#fs.op.is.directory)

### 31.12.13 Filesystem operation functions [[fs.op.funcs]](fs.op.funcs#fs.op.is.directory)

#### 31.12.13.19 Is directory [fs.op.is.directory]

[ð](#lib:is_directory)

`bool filesystem::is_directory(file_status s) noexcept;
`

[1](#1)

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

*Returns*: s.type() == file_type​::​directory[.](#1.sentence-1)

[ð](#lib:is_directory_)

`bool filesystem::is_directory(const path& p);
bool filesystem::is_directory(const path& p, error_code& ec) noexcept;
`

[2](#2)

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

*Returns*: is_directory(status(p)) or is_directory(status(p, ec)),
 respectively[.](#2.sentence-1)

The signature with argument ec returns false if an error occurs[.](#2.sentence-2)

[3](#3)

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

*Throws*: As specified in [[fs.err.report]](fs.err.report "31.12.5 Error reporting")[.](#3.sentence-1)
