tmp/tmprf013cso/{from.md → to.md}
RENAMED
|
@@ -1,11 +1,13 @@
|
|
| 1 |
### Class `recursive_directory_iterator` <a id="fs.class.rec.dir.itr">[[fs.class.rec.dir.itr]]</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
|
| 7 |
|
| 8 |
``` cpp
|
| 9 |
namespace std::filesystem {
|
| 10 |
class recursive_directory_iterator {
|
| 11 |
public:
|
|
@@ -45,10 +47,14 @@ namespace std::filesystem {
|
|
| 45 |
|
| 46 |
void pop();
|
| 47 |
void pop(error_code& ec);
|
| 48 |
void disable_recursion_pending();
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
// other members as required by [input.iterators], input iterators
|
| 51 |
};
|
| 52 |
}
|
| 53 |
```
|
| 54 |
|
|
@@ -58,11 +64,12 @@ results in undefined behavior.
|
|
| 58 |
|
| 59 |
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
|
|
|
|
| 64 |
|
| 65 |
#### Members <a id="fs.rec.dir.itr.members">[[fs.rec.dir.itr.members]]</a>
|
| 66 |
|
| 67 |
``` cpp
|
| 68 |
recursive_directory_iterator() noexcept;
|
|
@@ -93,13 +100,13 @@ error.
|
|
| 93 |
`directory_options` argument, otherwise
|
| 94 |
`options() == directory_options::none`.
|
| 95 |
|
| 96 |
*Throws:* As specified in [[fs.err.report]].
|
| 97 |
|
| 98 |
-
[*Note 1*:
|
| 99 |
-
`recursive_directory_iterator("
|
| 100 |
-
|
| 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 |
|
|
@@ -236,19 +243,19 @@ void disable_recursion_pending();
|
|
| 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
|
| 244 |
recursive_directory_iterator begin(recursive_directory_iterator iter) noexcept;
|
| 245 |
```
|
| 246 |
|
| 247 |
*Returns:* `iter`.
|
| 248 |
|
| 249 |
``` cpp
|
| 250 |
-
recursive_directory_iterator end(
|
| 251 |
```
|
| 252 |
|
| 253 |
*Returns:* `recursive_directory_iterator()`.
|
| 254 |
|
|
|
|
| 1 |
### Class `recursive_directory_iterator` <a id="fs.class.rec.dir.itr">[[fs.class.rec.dir.itr]]</a>
|
| 2 |
|
| 3 |
+
#### General <a id="fs.class.rec.dir.itr.general">[[fs.class.rec.dir.itr.general]]</a>
|
| 4 |
+
|
| 5 |
An object of type `recursive_directory_iterator` provides an iterator
|
| 6 |
for a sequence of `directory_entry` elements representing the files in a
|
| 7 |
directory or in an *implementation-defined* directory-like file type,
|
| 8 |
+
and its subdirectories.
|
| 9 |
|
| 10 |
``` cpp
|
| 11 |
namespace std::filesystem {
|
| 12 |
class recursive_directory_iterator {
|
| 13 |
public:
|
|
|
|
| 47 |
|
| 48 |
void pop();
|
| 49 |
void pop(error_code& ec);
|
| 50 |
void disable_recursion_pending();
|
| 51 |
|
| 52 |
+
bool operator==(default_sentinel_t) const noexcept {
|
| 53 |
+
return *this == recursive_directory_iterator();
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
// other members as required by [input.iterators], input iterators
|
| 57 |
};
|
| 58 |
}
|
| 59 |
```
|
| 60 |
|
|
|
|
| 64 |
|
| 65 |
The behavior of a `recursive_directory_iterator` is the same as a
|
| 66 |
`directory_iterator` unless otherwise specified.
|
| 67 |
|
| 68 |
[*Note 1*: If the directory structure being iterated over contains
|
| 69 |
+
cycles then it is possible that the end iterator is
|
| 70 |
+
unreachable. — *end note*]
|
| 71 |
|
| 72 |
#### Members <a id="fs.rec.dir.itr.members">[[fs.rec.dir.itr.members]]</a>
|
| 73 |
|
| 74 |
``` cpp
|
| 75 |
recursive_directory_iterator() noexcept;
|
|
|
|
| 100 |
`directory_options` argument, otherwise
|
| 101 |
`options() == directory_options::none`.
|
| 102 |
|
| 103 |
*Throws:* As specified in [[fs.err.report]].
|
| 104 |
|
| 105 |
+
[*Note 1*: Use `recursive_directory_iterator(".")` rather than
|
| 106 |
+
`recursive_directory_iterator("")` to iterate over the current
|
| 107 |
+
directory. — *end note*]
|
| 108 |
|
| 109 |
[*Note 2*: By default, `recursive_directory_iterator` does not follow
|
| 110 |
directory symlinks. To follow directory symlinks, specify `options` as
|
| 111 |
`directory_options::follow_directory_symlink`. — *end note*]
|
| 112 |
|
|
|
|
| 243 |
recursion into a directory. — *end note*]
|
| 244 |
|
| 245 |
#### Non-member functions <a id="fs.rec.dir.itr.nonmembers">[[fs.rec.dir.itr.nonmembers]]</a>
|
| 246 |
|
| 247 |
These functions enable use of `recursive_directory_iterator` with
|
| 248 |
+
range-based `for` statements.
|
| 249 |
|
| 250 |
``` cpp
|
| 251 |
recursive_directory_iterator begin(recursive_directory_iterator iter) noexcept;
|
| 252 |
```
|
| 253 |
|
| 254 |
*Returns:* `iter`.
|
| 255 |
|
| 256 |
``` cpp
|
| 257 |
+
recursive_directory_iterator end(recursive_directory_iterator) noexcept;
|
| 258 |
```
|
| 259 |
|
| 260 |
*Returns:* `recursive_directory_iterator()`.
|
| 261 |
|