From Jason Turner

[fs.class.rec.dir.itr.general]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmptxroohhn/{from.md → to.md} +69 -0
tmp/tmptxroohhn/{from.md → to.md} RENAMED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### General <a id="fs.class.rec.dir.itr.general">[[fs.class.rec.dir.itr.general]]</a>
2
+
3
+ An object of type `recursive_directory_iterator` provides an iterator
4
+ for a sequence of `directory_entry` elements representing the files in a
5
+ directory or in an *implementation-defined* directory-like file type,
6
+ and its subdirectories.
7
+
8
+ ``` cpp
9
+ namespace std::filesystem {
10
+ class recursive_directory_iterator {
11
+ public:
12
+ using iterator_category = input_iterator_tag;
13
+ using value_type = directory_entry;
14
+ using difference_type = ptrdiff_t;
15
+ using pointer = const directory_entry*;
16
+ using reference = const directory_entry&;
17
+
18
+ // [fs.rec.dir.itr.members], constructors and destructor
19
+ recursive_directory_iterator() noexcept;
20
+ explicit recursive_directory_iterator(const path& p);
21
+ recursive_directory_iterator(const path& p, directory_options options);
22
+ recursive_directory_iterator(const path& p, directory_options options,
23
+ error_code& ec);
24
+ recursive_directory_iterator(const path& p, error_code& ec);
25
+ recursive_directory_iterator(const recursive_directory_iterator& rhs);
26
+ recursive_directory_iterator(recursive_directory_iterator&& rhs) noexcept;
27
+ ~recursive_directory_iterator();
28
+
29
+ // [fs.rec.dir.itr.members], observers
30
+ directory_options options() const;
31
+ int depth() const;
32
+ bool recursion_pending() const;
33
+
34
+ const directory_entry& operator*() const;
35
+ const directory_entry* operator->() const;
36
+
37
+ // [fs.rec.dir.itr.members], modifiers
38
+ recursive_directory_iterator&
39
+ operator=(const recursive_directory_iterator& rhs);
40
+ recursive_directory_iterator&
41
+ operator=(recursive_directory_iterator&& rhs) noexcept;
42
+
43
+ recursive_directory_iterator& operator++();
44
+ recursive_directory_iterator& increment(error_code& ec);
45
+
46
+ void pop();
47
+ void pop(error_code& ec);
48
+ void disable_recursion_pending();
49
+
50
+ bool operator==(default_sentinel_t) const noexcept {
51
+ return *this == recursive_directory_iterator();
52
+ }
53
+
54
+ // other members as required by [input.iterators], input iterators
55
+ };
56
+ }
57
+ ```
58
+
59
+ Calling `options`, `depth`, `recursion_pending`, `pop` or
60
+ `disable_recursion_pending` on an iterator that is not dereferenceable
61
+ results in undefined behavior.
62
+
63
+ The behavior of a `recursive_directory_iterator` is the same as a
64
+ `directory_iterator` unless otherwise specified.
65
+
66
+ [*Note 1*: If the directory structure being iterated over contains
67
+ cycles then it is possible that the end iterator is
68
+ unreachable. — *end note*]
69
+