##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::filesystem::status_known

From cppreference.com
< cpp‎ | filesystem

Defined in header `<filesystem>` |  |
bool status_known( std::filesystem::file_status s ); | (1) | (since C++17)

Checks if the given file status is known, Equivalent to s.type() != file_type::none.

### [edit] Parameters

s | - | file status to check

### [edit] Return value

true if the given file status is an unknown file status

### [edit] Exceptions

`noexcept` specification:
noexcept

### [edit] Notes

Despite the name, the function checks for the file status of `file_type::none` (meaning an error occurred), not `file_type::unknown` (meaning file exists, but its type cannot be determined).

### [edit] See also

status symlink_status (C++17)(C++17) | determines file attributes determines file attributes, checking the symlink target (function) [edit]
status symlink_status | status of the file designated by this directory entry symlink_status of the file designated by this directory entry (public member function of `std::filesystem::directory_entry`) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/filesystem/status_known&oldid=91773"
Category:

- unconditionally noexcept

Hidden categories:

- Pages with unreviewed unconditional noexcept template
- Pages with unreviewed noexcept template