std::experimental::filesystem::is_directory
From cppreference.com
< cpp | experimental | fs
C++
Experimental
| Technical Specification | ||||
| Filesystem library (filesystem TS) | ||||
| Library fundamentals (library fundamentals TS) | ||||
| Library fundamentals 2 (library fundamentals TS v2) | ||||
| Library fundamentals 3 (library fundamentals TS v3) | ||||
| Extensions for parallelism (parallelism TS) | ||||
| Extensions for parallelism 2 (parallelism TS v2) | ||||
| Extensions for concurrency (concurrency TS) | ||||
| Extensions for concurrency 2 (concurrency TS v2) | ||||
| Concepts (concepts TS) | ||||
| Ranges (ranges TS) | ||||
| Reflection (reflection TS) | ||||
| Mathematical special functions (special functions TR) | ||||
| Experimental Non-TS | ||||
| Pattern Matching | ||||
| Linear Algebra | ||||
| std::execution | ||||
| Contracts | ||||
| 2D Graphics |
Filesystem library
| Classes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| File types | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Defined in header <experimental/filesystem>
|
||
| bool is_directory( file_status s ); |
(1) | (filesystem TS) |
| bool is_directory( const path& p ); |
(2) | (filesystem TS) |
| bool is_directory( const path& p, error_code& ec ); |
(3) | (filesystem TS) |
Checks if the given file status or path corresponds to a directory.
1) Equivalent to s.type() == file_type::directory.
2) Equivalent to is_directory(status(p)).
3) Equivalent to is_directory(status(p, ec)). Returns false if error occurs.
Contents |
[edit] Parameters
| s | - | file status to check |
| p | - | path to query |
| ec | - | error code to modify in case of errors |
[edit] Return value
true if the given path or file status corresponds to a directory, false otherwise.
[edit] Exceptions
1,3)
noexcept specification:
noexcept
2) Throws filesystem_error if an error occurs. The exception object is constructed with p as an argument.
[edit] See also
| This section is incomplete |