Difference between revisions of "cpp/filesystem/status known"
From cppreference.com
< cpp | filesystem
m (merge noexcept, and we somehow got the return backwards) |
m (→Notes: added links to file_type::none/unknown as close as possible, but not closer.) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 8: | Line 8: | ||
{{dcl end}} | {{dcl end}} | ||
− | Checks if the given file status is known, | + | Checks if the given file status is known, equivalent to {{c|1=s.type() != file_type::none}}. |
===Parameters=== | ===Parameters=== | ||
Line 19: | Line 19: | ||
===Notes=== | ===Notes=== | ||
− | Despite the name, the function checks for the file status of {{ | + | Despite the name, the function checks for the file status of {{lc|std::filesystem::file_type::none|file_type::none}} (meaning an error occurred), not {{lc|std::filesystem::file_type::unknown|file_type::unknown}} (meaning file exists, but its type cannot be determined). |
===See also=== | ===See also=== | ||
Line 27: | Line 27: | ||
{{dsc end}} | {{dsc end}} | ||
− | {{langlinks|zh}} | + | {{langlinks|es|ja|zh}} |
Latest revision as of 20:20, 9 December 2021
Defined in header <filesystem>
|
||
bool status_known( std::filesystem::file_status s ) noexcept; |
(1) | (since C++17) |
Checks if the given file status is known, equivalent to s.type() != file_type::none.
Contents |
[edit] Parameters
s | - | file status to check |
[edit] Return value
true if the given file status is a known file status.
[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
(C++17)(C++17) |
determines file attributes determines file attributes, checking the symlink target (function) |
status of the file designated by this directory entry; status of the file/symlink designated by this directory entry (public member function of std::filesystem::directory_entry )
|