std::filesy...ory_options(3)
π std::filesystem::directory_options π
okay bestie, so this is std::filesystem::directory_options from the C++ Standard Library (the cppreference girlies run this one) and honestly? it's giving "tiny enum, huge power." it's the little options menu that tells your directory iterators how to behave. no cap. π¦
β¨ Synopsis β¨
first things first, she lives here:
Defined in header <filesystem>
and here's literally the whole shape of her:
enum class directory_options {
none = /* unspecified */,
follow_directory_symlink = /* unspecified */, (since C++17)
skip_permission_denied = /* unspecified */
};
so what is this? this type represents the available options that control the behavior of the directory_iterator and the recursive_directory_iterator. that's her whole job. π
and listen β directory_options satisfies the requirements of BitmaskType, which means the bitwise operators operator&, operator|, operator^, operator~, operator&=, operator|=, and operator^= are all defined for this type. every single one. slay. β¨
none represents the empty bitmask, and every other enumerator represents a distinct bitmask element. periodt. π
π Member constants π
here's the lineup, main character energy only:
noneβ the default. skips directory symlinks, and permission denied is an error. πfollow_directory_symlinkβ follows directory symlinks instead of skipping them. she's curious like that. π¦skip_permission_deniedβ skips directories that would otherwise result in permission denied errors. avoiding the drama, iconic. π
πΈ Example πΈ
big mood: this section is incomplete.
Reason: no example
(it's giving "we'll do it later" and honestly, relatable. π)
π«Ά See also π«Ά
- constructor β constructs a directory iterator (public member function of
std::filesystem::directory_iterator) - constructor β constructs a recursive directory iterator (public member function of
std::filesystem::recursive_directory_iterator)
π Category π
- Todo no example
β cute lil sign-off: this page is straight from http://cppreference.com, version 2024.06.10, and yeah she's indexed as std::filesy...ory_options(3) β the truncated name is lowkey a vibe. bye bestie, go enumerate some directories ππ
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms