30 Input/output library [input.output]

30.10 File systems [filesystems]

30.10.32 Class directory_­iterator [fs.class.directory_iterator]

30.10.32.1 directory_­iterator 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) noexcept; directory_iterator(const path& p, directory_options options, error_code& ec) noexcept;

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: 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;

Effects: Constructs an object of class directory_­iterator.

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) noexcept;

Effects: As specified for the prefix increment operation of Input iterators.

Returns: *this.

Throws: As specified in [fs.err.report].