tmp/tmpi8gm4vyr/{from.md → to.md}
RENAMED
|
@@ -1,33 +1,33 @@
|
|
| 1 |
-
####
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
recursive_directory_iterator() noexcept;
|
| 5 |
```
|
| 6 |
|
| 7 |
*Effects:* Constructs the end iterator.
|
| 8 |
|
| 9 |
``` cpp
|
| 10 |
explicit recursive_directory_iterator(const path& p);
|
| 11 |
recursive_directory_iterator(const path& p, directory_options options);
|
| 12 |
-
recursive_directory_iterator(const path& p, directory_options options, error_code& ec)
|
| 13 |
-
recursive_directory_iterator(const path& p, error_code& ec)
|
| 14 |
```
|
| 15 |
|
| 16 |
-
*Effects:* Constructs
|
| 17 |
-
directory `p` resolves
|
| 18 |
-
if
|
| 19 |
|
| 20 |
``` cpp
|
| 21 |
(options & directory_options::skip_permission_denied) != directory_options::none
|
| 22 |
```
|
| 23 |
|
| 24 |
and construction encounters an error indicating that permission to
|
| 25 |
access `p` is denied, constructs the end iterator and does not report an
|
| 26 |
error.
|
| 27 |
|
| 28 |
-
*
|
| 29 |
`directory_options` argument, otherwise
|
| 30 |
`options() == directory_options::none`.
|
| 31 |
|
| 32 |
*Throws:* As specified in [[fs.err.report]].
|
| 33 |
|
|
@@ -35,42 +35,38 @@ error.
|
|
| 35 |
`recursive_directory_iterator(".")` rather than
|
| 36 |
`recursive_directory_iterator("")`. — *end note*]
|
| 37 |
|
| 38 |
[*Note 2*: By default, `recursive_directory_iterator` does not follow
|
| 39 |
directory symlinks. To follow directory symlinks, specify `options` as
|
| 40 |
-
`directory_options::follow_directory_symlink` — *end note*]
|
| 41 |
|
| 42 |
``` cpp
|
| 43 |
recursive_directory_iterator(const recursive_directory_iterator& rhs);
|
| 44 |
```
|
| 45 |
|
| 46 |
-
*
|
| 47 |
-
|
| 48 |
-
*Postconditions:*
|
| 49 |
|
| 50 |
- `options() == rhs.options()`
|
| 51 |
- `depth() == rhs.depth()`
|
| 52 |
- `recursion_pending() == rhs.recursion_pending()`
|
| 53 |
|
| 54 |
``` cpp
|
| 55 |
recursive_directory_iterator(recursive_directory_iterator&& rhs) noexcept;
|
| 56 |
```
|
| 57 |
|
| 58 |
-
*
|
| 59 |
-
|
| 60 |
-
*Postconditions:* `options()`, `depth()`, and `recursion_pending()` have
|
| 61 |
-
the values that `rhs.options()`, `rhs.depth()`, and
|
| 62 |
`rhs.recursion_pending()`, respectively, had before the function call.
|
| 63 |
|
| 64 |
``` cpp
|
| 65 |
recursive_directory_iterator& operator=(const recursive_directory_iterator& rhs);
|
| 66 |
```
|
| 67 |
|
| 68 |
*Effects:* If `*this` and `rhs` are the same object, the member has no
|
| 69 |
effect.
|
| 70 |
|
| 71 |
-
*
|
| 72 |
|
| 73 |
- `options() == rhs.options()`
|
| 74 |
- `depth() == rhs.depth()`
|
| 75 |
- `recursion_pending() == rhs.recursion_pending()`
|
| 76 |
|
|
@@ -81,12 +77,12 @@ recursive_directory_iterator& operator=(recursive_directory_iterator&& rhs) noex
|
|
| 81 |
```
|
| 82 |
|
| 83 |
*Effects:* If `*this` and `rhs` are the same object, the member has no
|
| 84 |
effect.
|
| 85 |
|
| 86 |
-
*
|
| 87 |
-
|
| 88 |
`rhs.recursion_pending()`, respectively, had before the function call.
|
| 89 |
|
| 90 |
*Returns:* `*this`.
|
| 91 |
|
| 92 |
``` cpp
|
|
@@ -119,15 +115,15 @@ subsequent to the prior construction or increment operation, otherwise
|
|
| 119 |
|
| 120 |
*Throws:* Nothing.
|
| 121 |
|
| 122 |
``` cpp
|
| 123 |
recursive_directory_iterator& operator++();
|
| 124 |
-
recursive_directory_iterator& increment(error_code& ec)
|
| 125 |
```
|
| 126 |
|
| 127 |
*Effects:* As specified for the prefix increment operation of Input
|
| 128 |
-
iterators
|
| 129 |
|
| 130 |
- If there are no more entries at the current depth, then if
|
| 131 |
`depth() != 0` iteration over the parent directory resumes; otherwise
|
| 132 |
`*this = recursive_directory_iterator()`.
|
| 133 |
- Otherwise if
|
|
@@ -161,14 +157,17 @@ void pop(error_code& ec);
|
|
| 161 |
directory currently being iterated over, and continue iteration over the
|
| 162 |
parent directory.
|
| 163 |
|
| 164 |
*Throws:* As specified in [[fs.err.report]].
|
| 165 |
|
|
|
|
|
|
|
|
|
|
| 166 |
``` cpp
|
| 167 |
void disable_recursion_pending();
|
| 168 |
```
|
| 169 |
|
| 170 |
-
*
|
| 171 |
|
| 172 |
[*Note 4*: `disable_recursion_pending``()` is used to prevent unwanted
|
| 173 |
recursion into a directory. — *end note*]
|
| 174 |
|
|
|
|
| 1 |
+
#### Members <a id="fs.rec.dir.itr.members">[[fs.rec.dir.itr.members]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
recursive_directory_iterator() noexcept;
|
| 5 |
```
|
| 6 |
|
| 7 |
*Effects:* Constructs the end iterator.
|
| 8 |
|
| 9 |
``` cpp
|
| 10 |
explicit recursive_directory_iterator(const path& p);
|
| 11 |
recursive_directory_iterator(const path& p, directory_options options);
|
| 12 |
+
recursive_directory_iterator(const path& p, directory_options options, error_code& ec);
|
| 13 |
+
recursive_directory_iterator(const path& p, error_code& ec);
|
| 14 |
```
|
| 15 |
|
| 16 |
+
*Effects:* Constructs an iterator representing the first entry in the
|
| 17 |
+
directory to which `p` resolves, if any; otherwise, the end iterator.
|
| 18 |
+
However, if
|
| 19 |
|
| 20 |
``` cpp
|
| 21 |
(options & directory_options::skip_permission_denied) != directory_options::none
|
| 22 |
```
|
| 23 |
|
| 24 |
and construction encounters an error indicating that permission to
|
| 25 |
access `p` is denied, constructs the end iterator and does not report an
|
| 26 |
error.
|
| 27 |
|
| 28 |
+
*Ensures:* `options() == options` for the signatures with a
|
| 29 |
`directory_options` argument, otherwise
|
| 30 |
`options() == directory_options::none`.
|
| 31 |
|
| 32 |
*Throws:* As specified in [[fs.err.report]].
|
| 33 |
|
|
|
|
| 35 |
`recursive_directory_iterator(".")` rather than
|
| 36 |
`recursive_directory_iterator("")`. — *end note*]
|
| 37 |
|
| 38 |
[*Note 2*: By default, `recursive_directory_iterator` does not follow
|
| 39 |
directory symlinks. To follow directory symlinks, specify `options` as
|
| 40 |
+
`directory_options::follow_directory_symlink`. — *end note*]
|
| 41 |
|
| 42 |
``` cpp
|
| 43 |
recursive_directory_iterator(const recursive_directory_iterator& rhs);
|
| 44 |
```
|
| 45 |
|
| 46 |
+
*Ensures:*
|
|
|
|
|
|
|
| 47 |
|
| 48 |
- `options() == rhs.options()`
|
| 49 |
- `depth() == rhs.depth()`
|
| 50 |
- `recursion_pending() == rhs.recursion_pending()`
|
| 51 |
|
| 52 |
``` cpp
|
| 53 |
recursive_directory_iterator(recursive_directory_iterator&& rhs) noexcept;
|
| 54 |
```
|
| 55 |
|
| 56 |
+
*Ensures:* `options()`, `depth()`, and `recursion_pending()` have the
|
| 57 |
+
values that `rhs.options()`, `rhs.depth()`, and
|
|
|
|
|
|
|
| 58 |
`rhs.recursion_pending()`, respectively, had before the function call.
|
| 59 |
|
| 60 |
``` cpp
|
| 61 |
recursive_directory_iterator& operator=(const recursive_directory_iterator& rhs);
|
| 62 |
```
|
| 63 |
|
| 64 |
*Effects:* If `*this` and `rhs` are the same object, the member has no
|
| 65 |
effect.
|
| 66 |
|
| 67 |
+
*Ensures:*
|
| 68 |
|
| 69 |
- `options() == rhs.options()`
|
| 70 |
- `depth() == rhs.depth()`
|
| 71 |
- `recursion_pending() == rhs.recursion_pending()`
|
| 72 |
|
|
|
|
| 77 |
```
|
| 78 |
|
| 79 |
*Effects:* If `*this` and `rhs` are the same object, the member has no
|
| 80 |
effect.
|
| 81 |
|
| 82 |
+
*Ensures:* `options()`, `depth()`, and `recursion_pending()` have the
|
| 83 |
+
values that `rhs.options()`, `rhs.depth()`, and
|
| 84 |
`rhs.recursion_pending()`, respectively, had before the function call.
|
| 85 |
|
| 86 |
*Returns:* `*this`.
|
| 87 |
|
| 88 |
``` cpp
|
|
|
|
| 115 |
|
| 116 |
*Throws:* Nothing.
|
| 117 |
|
| 118 |
``` cpp
|
| 119 |
recursive_directory_iterator& operator++();
|
| 120 |
+
recursive_directory_iterator& increment(error_code& ec);
|
| 121 |
```
|
| 122 |
|
| 123 |
*Effects:* As specified for the prefix increment operation of Input
|
| 124 |
+
iterators [[input.iterators]], except that:
|
| 125 |
|
| 126 |
- If there are no more entries at the current depth, then if
|
| 127 |
`depth() != 0` iteration over the parent directory resumes; otherwise
|
| 128 |
`*this = recursive_directory_iterator()`.
|
| 129 |
- Otherwise if
|
|
|
|
| 157 |
directory currently being iterated over, and continue iteration over the
|
| 158 |
parent directory.
|
| 159 |
|
| 160 |
*Throws:* As specified in [[fs.err.report]].
|
| 161 |
|
| 162 |
+
*Remarks:* Any copies of the previous value of `*this` are no longer
|
| 163 |
+
required to be dereferenceable nor to be in the domain of `==`.
|
| 164 |
+
|
| 165 |
``` cpp
|
| 166 |
void disable_recursion_pending();
|
| 167 |
```
|
| 168 |
|
| 169 |
+
*Ensures:* `recursion_pending() == false`.
|
| 170 |
|
| 171 |
[*Note 4*: `disable_recursion_pending``()` is used to prevent unwanted
|
| 172 |
recursion into a directory. — *end note*]
|
| 173 |
|