31 Input/output library [input.output]

31.12 File systems [filesystems]

31.12.11 Class directory_iterator [fs.class.directory.iterator]

31.12.11.2 Members [fs.dir.itr.members]

directory_iterator() noexcept;
Effects: Constructs the end iterator.
explicit directory_iterator(const path& p); directory_iterator(const path& p, directory_options options); directory_iterator(const path& p, error_code& ec); directory_iterator(const path& p, directory_options options, error_code& ec);
Effects: For the directory that p resolves to, constructs an iterator for the first element in a sequence of directory_entry elements representing the files in the directory, if any; otherwise the end iterator.
However, if (options & directory_options::skip_permission_denied) != directory_options::none and construction encounters an error indicating that permission to access p is denied, constructs the end iterator and does not report an error.
Throws: As specified in [fs.err.report].
[Note 1: 
To iterate over the current directory, use directory_iterator(".") rather than directory_iterator("").
— end note]
directory_iterator(const directory_iterator& rhs); directory_iterator(directory_iterator&& rhs) noexcept;
Postconditions: *this has the original value of rhs.
directory_iterator& operator=(const directory_iterator& rhs); directory_iterator& operator=(directory_iterator&& rhs) noexcept;
Effects: If *this and rhs are the same object, the member has no effect.
Postconditions: *this has the original value of rhs.
Returns: *this.
directory_iterator& operator++(); directory_iterator& increment(error_code& ec);
Effects: As specified for the prefix increment operation of Input iterators.
Returns: *this.
Throws: As specified in [fs.err.report].