Compartir a través de


basic_recursive_directory_iterator Class

Describes an input iterator that sequences through the file names in a file system directory. The iterator can also descend into subdirectories. For an iterator X, the expression *X evaluates to a basic_directory_entry object that wraps a file name and anything that's known about the status of the associated file.

template<class Path>
class basic_recursive_directory_iterator : public iterator<input_iterator_tag, basic_directory_entry<Path>>;

Remarks

The class stores an object of type Path, which represents the current file name in the directory sequence. Path can be either a basic_path or a type that's derived from basic_path.

The class also stores a bool that indicates whether recursive descent into subdirectories is inhibited.

Members

Public Typedefs

Name

Description

basic_recursive_directory_iterator::char_type

A synonym for string_type::value_type.

basic_recursive_directory_iterator::path_type

A synonym for template parameter Path.

basic_recursive_directory_iterator::pointer

A synonym for value_type*.

basic_recursive_directory_iterator::string_type

A synonym for the string type Path::string_type.

basic_recursive_directory_iterator::value_type

A synonym for basic_directory_entry<Path>.

Public Constructors

Name

Description

basic_recursive_directory_iterator::basic_recursive_directory_iterator Constructor

Constructs a basic_recursive_directory_iterator object.

Public Methods

Name

Description

basic_recursive_directory_iterator::level Method

Returns the number of levels that the iterator has descended into the directory hierarchy.

basic_recursive_directory_iterator::no_push Method

Prohibits descent into subdirectories.

basic_recursive_directory_iterator::pop Method

Discontinues reading in the current subdirectory and increments the iterator.

Public Operators

Name

Description

basic_recursive_directory_iterator::operator* Operator

Retrieves the stored Path object.

basic_recursive_directory_iterator::operator++ Operator

Reads and stores the next Path object.

basic_recursive_directory_iterator::operator= Operator

Assignment operator for the current Path object.

basic_recursive_directory_iterator::operator-> Operator

Returns &**this.

Requirements

Header: filesystem

Namespace: std::tr2::sys

See Also

Reference

<filesystem>

Other Resources

C++ Standard Library Header Files