##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::experimental::filesystem::recursive_directory_iterator::depth

From cppreference.com
< cpp‎ | experimental‎ | fs‎ | recursive directory iterator

int depth() const; |  | (filesystem TS)

Returns the number of directories from the starting directory to the currently iterated directory, i.e. the current depth of the directory hierarchy.

The starting directory has depth of 0.

### [edit] Parameters

(none)

### [edit] Return value

Current depth of the directory hierarchy.

### [edit] Exceptions

(none)

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/experimental/fs/recursive_directory_iterator/depth&oldid=68653"