27 Input/output library [input.output]

27.10 File systems [filesystems]

27.10.13 Class directory_iterator [class.directory_iterator]

27.10.13.1 directory_iterator members [directory_iterator.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 ([input.iterators]).

Returns: *this.

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