Share via


basic_recursive_directory_iterator::basic_recursive_directory_iterator Constructor

Constructs a basic_recursive_directory_iterator object.

basic_recursive_directory_iterator();
basic_recursive_directory_iterator(const Path& Pval);
basic_recursive_directory_iterator(const Path& Pval, error_code& Code);
basic_recursive_directory_iterator(const basic_recursive_directory_iterator& Right);
basic_recursive_directory_iterator(basic_recursive_directory_iterator&& Right);

Parameters

  • Right
    A basic_recursive_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 that has the stored file name in Pval. If the open or read fails, the object stores an empty file name.

The third constructor stores any error that is associated with the construction in Code.

Each of the first three constructors allow for descent into subdirectories.

The fourth constructor copy-constructs an 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 associated status as the current entry in the iterated sequence.

Requirements

Header: filesystem

Namespace: std::tr2::sys

See Also

Reference

basic_recursive_directory_iterator Class

<filesystem>