Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/filesystem/directory options"

From cppreference.com
m (link to zh)
(2851)
Line 14: Line 14:
 
This type represents available options that control the behavior of the {{ltt|cpp/filesystem/directory_iterator}} and {{ltt|cpp/filesystem/recursive_directory_iterator}}.
 
This type represents available options that control the behavior of the {{ltt|cpp/filesystem/directory_iterator}} and {{ltt|cpp/filesystem/recursive_directory_iterator}}.
  
{{tt|directory_options}} satisfies the requirements of {{concept|BitmaskType}} (which means the bitwise operators {{c|operator&}}, {{c|operator{{!}}}}, {{c|operator^}}, {{c|operator~}}, {{c|operator&{{=}}}}, {{c|operator{{!}}{{=}}}}, and {{c|operator^{{=}}}} are defined for this type)
+
{{tt|directory_options}} satisfies the requirements of {{concept|BitmaskType}} (which means the bitwise operators {{c|operator&}}, {{c|operator{{!}}}}, {{c|operator^}}, {{c|operator~}}, {{c|operator&{{=}}}}, {{c|operator{{!}}{{=}}}}, and {{c|operator^{{=}}}} are defined for this type). {{tt|none}} represents the empty bitmask; every other enumerator represents a distinct bitmask element.
  
 
===Member constants===
 
===Member constants===

Revision as of 06:28, 18 March 2018

 
 
 
Defined in header <filesystem>
enum class directory_options {

    none = /* unspecified */,
    follow_directory_symlink = /* unspecified */,
    skip_permission_denied = /* unspecified */

};
(since C++17)

This type represents available options that control the behavior of the directory_iterator and recursive_directory_iterator.

directory_options satisfies the requirements of Template:concept (which means the bitwise operators operator&, operator|, operator^, operator~, operator&=, operator|=, and operator^= are defined for this type). none represents the empty bitmask; every other enumerator represents a distinct bitmask element.

Member constants

Member constant Meaning
none (Default) Skip directory symlinks, permission denied is error.
follow_directory_symlink Follow rather than skip directory symlinks.
skip_permission_denied Skip directories that would otherwise result in permission denied errors.

See also

constructs a directory iterator
(public member function of std::filesystem::directory_iterator) [edit]
constructs a recursive directory iterator
(public member function of std::filesystem::recursive_directory_iterator) [edit]