Function

CFURLEnumeratorGetDescendentLevel(_:)

Returns the number of levels a recursive directory enumerator has descended.

Declaration

func CFURLEnumeratorGetDescendentLevel(_ enumerator: CFURLEnumerator!) -> CFIndex

Parameters

enumerator

The directory enumerator.

Return Value

The current descendent level of the enumerator.

Discussion

The children of the starting directory are at level 1. Each time a recursive enumerator descends into a subdirectory, it adds 1 to the descendent level. It subtracts 1 from its level when it finishes a subdirectory and continues enumerating the parent directory.