tmp/tmpx_kotavf/{from.md → to.md}
RENAMED
|
@@ -18,12 +18,12 @@ namespace std::filesystem {
|
|
| 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
|
|
@@ -39,11 +39,11 @@ namespace std::filesystem {
|
|
| 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 |
|
|
@@ -60,38 +60,38 @@ The behavior of a `recursive_directory_iterator` is the same as a
|
|
| 60 |
`directory_iterator` unless otherwise specified.
|
| 61 |
|
| 62 |
[*Note 1*: If the directory structure being iterated over contains
|
| 63 |
cycles then the end iterator may be unreachable. — *end note*]
|
| 64 |
|
| 65 |
-
####
|
| 66 |
|
| 67 |
``` cpp
|
| 68 |
recursive_directory_iterator() noexcept;
|
| 69 |
```
|
| 70 |
|
| 71 |
*Effects:* Constructs the end iterator.
|
| 72 |
|
| 73 |
``` cpp
|
| 74 |
explicit recursive_directory_iterator(const path& p);
|
| 75 |
recursive_directory_iterator(const path& p, directory_options options);
|
| 76 |
-
recursive_directory_iterator(const path& p, directory_options options, error_code& ec)
|
| 77 |
-
recursive_directory_iterator(const path& p, error_code& ec)
|
| 78 |
```
|
| 79 |
|
| 80 |
-
*Effects:* Constructs
|
| 81 |
-
directory `p` resolves
|
| 82 |
-
if
|
| 83 |
|
| 84 |
``` cpp
|
| 85 |
(options & directory_options::skip_permission_denied) != directory_options::none
|
| 86 |
```
|
| 87 |
|
| 88 |
and construction encounters an error indicating that permission to
|
| 89 |
access `p` is denied, constructs the end iterator and does not report an
|
| 90 |
error.
|
| 91 |
|
| 92 |
-
*
|
| 93 |
`directory_options` argument, otherwise
|
| 94 |
`options() == directory_options::none`.
|
| 95 |
|
| 96 |
*Throws:* As specified in [[fs.err.report]].
|
| 97 |
|
|
@@ -99,42 +99,38 @@ error.
|
|
| 99 |
`recursive_directory_iterator(".")` rather than
|
| 100 |
`recursive_directory_iterator("")`. — *end note*]
|
| 101 |
|
| 102 |
[*Note 2*: By default, `recursive_directory_iterator` does not follow
|
| 103 |
directory symlinks. To follow directory symlinks, specify `options` as
|
| 104 |
-
`directory_options::follow_directory_symlink` — *end note*]
|
| 105 |
|
| 106 |
``` cpp
|
| 107 |
recursive_directory_iterator(const recursive_directory_iterator& rhs);
|
| 108 |
```
|
| 109 |
|
| 110 |
-
*
|
| 111 |
-
|
| 112 |
-
*Postconditions:*
|
| 113 |
|
| 114 |
- `options() == rhs.options()`
|
| 115 |
- `depth() == rhs.depth()`
|
| 116 |
- `recursion_pending() == rhs.recursion_pending()`
|
| 117 |
|
| 118 |
``` cpp
|
| 119 |
recursive_directory_iterator(recursive_directory_iterator&& rhs) noexcept;
|
| 120 |
```
|
| 121 |
|
| 122 |
-
*
|
| 123 |
-
|
| 124 |
-
*Postconditions:* `options()`, `depth()`, and `recursion_pending()` have
|
| 125 |
-
the values that `rhs.options()`, `rhs.depth()`, and
|
| 126 |
`rhs.recursion_pending()`, respectively, had before the function call.
|
| 127 |
|
| 128 |
``` cpp
|
| 129 |
recursive_directory_iterator& operator=(const recursive_directory_iterator& rhs);
|
| 130 |
```
|
| 131 |
|
| 132 |
*Effects:* If `*this` and `rhs` are the same object, the member has no
|
| 133 |
effect.
|
| 134 |
|
| 135 |
-
*
|
| 136 |
|
| 137 |
- `options() == rhs.options()`
|
| 138 |
- `depth() == rhs.depth()`
|
| 139 |
- `recursion_pending() == rhs.recursion_pending()`
|
| 140 |
|
|
@@ -145,12 +141,12 @@ recursive_directory_iterator& operator=(recursive_directory_iterator&& rhs) noex
|
|
| 145 |
```
|
| 146 |
|
| 147 |
*Effects:* If `*this` and `rhs` are the same object, the member has no
|
| 148 |
effect.
|
| 149 |
|
| 150 |
-
*
|
| 151 |
-
|
| 152 |
`rhs.recursion_pending()`, respectively, had before the function call.
|
| 153 |
|
| 154 |
*Returns:* `*this`.
|
| 155 |
|
| 156 |
``` cpp
|
|
@@ -183,15 +179,15 @@ subsequent to the prior construction or increment operation, otherwise
|
|
| 183 |
|
| 184 |
*Throws:* Nothing.
|
| 185 |
|
| 186 |
``` cpp
|
| 187 |
recursive_directory_iterator& operator++();
|
| 188 |
-
recursive_directory_iterator& increment(error_code& ec)
|
| 189 |
```
|
| 190 |
|
| 191 |
*Effects:* As specified for the prefix increment operation of Input
|
| 192 |
-
iterators
|
| 193 |
|
| 194 |
- If there are no more entries at the current depth, then if
|
| 195 |
`depth() != 0` iteration over the parent directory resumes; otherwise
|
| 196 |
`*this = recursive_directory_iterator()`.
|
| 197 |
- Otherwise if
|
|
@@ -225,20 +221,23 @@ void pop(error_code& ec);
|
|
| 225 |
directory currently being iterated over, and continue iteration over the
|
| 226 |
parent directory.
|
| 227 |
|
| 228 |
*Throws:* As specified in [[fs.err.report]].
|
| 229 |
|
|
|
|
|
|
|
|
|
|
| 230 |
``` cpp
|
| 231 |
void disable_recursion_pending();
|
| 232 |
```
|
| 233 |
|
| 234 |
-
*
|
| 235 |
|
| 236 |
[*Note 4*: `disable_recursion_pending``()` is used to prevent unwanted
|
| 237 |
recursion into a directory. — *end note*]
|
| 238 |
|
| 239 |
-
####
|
| 240 |
|
| 241 |
These functions enable use of `recursive_directory_iterator` with
|
| 242 |
range-based for statements.
|
| 243 |
|
| 244 |
``` cpp
|
|
|
|
| 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
|
|
|
|
| 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 |
|
|
|
|
| 60 |
`directory_iterator` unless otherwise specified.
|
| 61 |
|
| 62 |
[*Note 1*: If the directory structure being iterated over contains
|
| 63 |
cycles then the end iterator may be unreachable. — *end note*]
|
| 64 |
|
| 65 |
+
#### Members <a id="fs.rec.dir.itr.members">[[fs.rec.dir.itr.members]]</a>
|
| 66 |
|
| 67 |
``` cpp
|
| 68 |
recursive_directory_iterator() noexcept;
|
| 69 |
```
|
| 70 |
|
| 71 |
*Effects:* Constructs the end iterator.
|
| 72 |
|
| 73 |
``` cpp
|
| 74 |
explicit recursive_directory_iterator(const path& p);
|
| 75 |
recursive_directory_iterator(const path& p, directory_options options);
|
| 76 |
+
recursive_directory_iterator(const path& p, directory_options options, error_code& ec);
|
| 77 |
+
recursive_directory_iterator(const path& p, error_code& ec);
|
| 78 |
```
|
| 79 |
|
| 80 |
+
*Effects:* Constructs an iterator representing the first entry in the
|
| 81 |
+
directory to which `p` resolves, if any; otherwise, the end iterator.
|
| 82 |
+
However, if
|
| 83 |
|
| 84 |
``` cpp
|
| 85 |
(options & directory_options::skip_permission_denied) != directory_options::none
|
| 86 |
```
|
| 87 |
|
| 88 |
and construction encounters an error indicating that permission to
|
| 89 |
access `p` is denied, constructs the end iterator and does not report an
|
| 90 |
error.
|
| 91 |
|
| 92 |
+
*Ensures:* `options() == options` for the signatures with a
|
| 93 |
`directory_options` argument, otherwise
|
| 94 |
`options() == directory_options::none`.
|
| 95 |
|
| 96 |
*Throws:* As specified in [[fs.err.report]].
|
| 97 |
|
|
|
|
| 99 |
`recursive_directory_iterator(".")` rather than
|
| 100 |
`recursive_directory_iterator("")`. — *end note*]
|
| 101 |
|
| 102 |
[*Note 2*: By default, `recursive_directory_iterator` does not follow
|
| 103 |
directory symlinks. To follow directory symlinks, specify `options` as
|
| 104 |
+
`directory_options::follow_directory_symlink`. — *end note*]
|
| 105 |
|
| 106 |
``` cpp
|
| 107 |
recursive_directory_iterator(const recursive_directory_iterator& rhs);
|
| 108 |
```
|
| 109 |
|
| 110 |
+
*Ensures:*
|
|
|
|
|
|
|
| 111 |
|
| 112 |
- `options() == rhs.options()`
|
| 113 |
- `depth() == rhs.depth()`
|
| 114 |
- `recursion_pending() == rhs.recursion_pending()`
|
| 115 |
|
| 116 |
``` cpp
|
| 117 |
recursive_directory_iterator(recursive_directory_iterator&& rhs) noexcept;
|
| 118 |
```
|
| 119 |
|
| 120 |
+
*Ensures:* `options()`, `depth()`, and `recursion_pending()` have the
|
| 121 |
+
values that `rhs.options()`, `rhs.depth()`, and
|
|
|
|
|
|
|
| 122 |
`rhs.recursion_pending()`, respectively, had before the function call.
|
| 123 |
|
| 124 |
``` cpp
|
| 125 |
recursive_directory_iterator& operator=(const recursive_directory_iterator& rhs);
|
| 126 |
```
|
| 127 |
|
| 128 |
*Effects:* If `*this` and `rhs` are the same object, the member has no
|
| 129 |
effect.
|
| 130 |
|
| 131 |
+
*Ensures:*
|
| 132 |
|
| 133 |
- `options() == rhs.options()`
|
| 134 |
- `depth() == rhs.depth()`
|
| 135 |
- `recursion_pending() == rhs.recursion_pending()`
|
| 136 |
|
|
|
|
| 141 |
```
|
| 142 |
|
| 143 |
*Effects:* If `*this` and `rhs` are the same object, the member has no
|
| 144 |
effect.
|
| 145 |
|
| 146 |
+
*Ensures:* `options()`, `depth()`, and `recursion_pending()` have the
|
| 147 |
+
values that `rhs.options()`, `rhs.depth()`, and
|
| 148 |
`rhs.recursion_pending()`, respectively, had before the function call.
|
| 149 |
|
| 150 |
*Returns:* `*this`.
|
| 151 |
|
| 152 |
``` cpp
|
|
|
|
| 179 |
|
| 180 |
*Throws:* Nothing.
|
| 181 |
|
| 182 |
``` cpp
|
| 183 |
recursive_directory_iterator& operator++();
|
| 184 |
+
recursive_directory_iterator& increment(error_code& ec);
|
| 185 |
```
|
| 186 |
|
| 187 |
*Effects:* As specified for the prefix increment operation of Input
|
| 188 |
+
iterators [[input.iterators]], except that:
|
| 189 |
|
| 190 |
- If there are no more entries at the current depth, then if
|
| 191 |
`depth() != 0` iteration over the parent directory resumes; otherwise
|
| 192 |
`*this = recursive_directory_iterator()`.
|
| 193 |
- Otherwise if
|
|
|
|
| 221 |
directory currently being iterated over, and continue iteration over the
|
| 222 |
parent directory.
|
| 223 |
|
| 224 |
*Throws:* As specified in [[fs.err.report]].
|
| 225 |
|
| 226 |
+
*Remarks:* Any copies of the previous value of `*this` are no longer
|
| 227 |
+
required to be dereferenceable nor to be in the domain of `==`.
|
| 228 |
+
|
| 229 |
``` cpp
|
| 230 |
void disable_recursion_pending();
|
| 231 |
```
|
| 232 |
|
| 233 |
+
*Ensures:* `recursion_pending() == false`.
|
| 234 |
|
| 235 |
[*Note 4*: `disable_recursion_pending``()` is used to prevent unwanted
|
| 236 |
recursion into a directory. — *end note*]
|
| 237 |
|
| 238 |
+
#### Non-member functions <a id="fs.rec.dir.itr.nonmembers">[[fs.rec.dir.itr.nonmembers]]</a>
|
| 239 |
|
| 240 |
These functions enable use of `recursive_directory_iterator` with
|
| 241 |
range-based for statements.
|
| 242 |
|
| 243 |
``` cpp
|