basic_directory_iterator::basic_directory_iterator Constructor
Constructs a basic_directory_iterator object.
basic_directory_iterator();
basic_directory_iterator(const Path& Pval);
basic_directory_iterator(const Path& Pval, error_code& Code);
basic_directory_iterator(const basic_directory_iterator& Right);
basic_directory_iterator(basic_directory_iterator&& Right);
Parameters
Right
A basic_directory_iterator object.Pval
A Path object. Path can be either a basic_path or a type that is derived from basic_path.Code
An error_code object.
Remarks
The first constructor stores a null pointer.
The second and third constructors attempt to open and read the directory by using the stored file name in Pval. If the open or read fails, the object stores an empty file name.
The third constructor stores in Code any error that is associated with the construction.
The fourth constructor copy-constructs the stored Path object from Right.
The fifth constructor move-constructs an object from Right.
If the directory is successfully opened and contains at least one file name, the constructor stores the first file name and status as the current entry in the iterated sequence.
Requirements
Header: filesystem
Namespace: std::tr2::sys