---
title: "CFURLEnumeratorGetDescendentLevel(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfurlenumeratorgetdescendentlevel(_:)"
---

# CFURLEnumeratorGetDescendentLevel(_:)

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

## Declaration

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

## Parameters

- `enumerator`: The directory enumerator.

## Return Value

Return Value The current descendent level of the enumerator.

## Discussion

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.

## See Also

### Functions

- [CFAllocatorAllocateBytes(_:_:_:)](corefoundation/cfallocatorallocatebytes(_:_:_:).md)
- [CFAllocatorAllocateTyped(_:_:_:_:)](corefoundation/cfallocatorallocatetyped(_:_:_:_:).md)
- [CFAllocatorReallocateBytes(_:_:_:_:)](corefoundation/cfallocatorreallocatebytes(_:_:_:_:).md)
- [CFAllocatorReallocateTyped(_:_:_:_:_:)](corefoundation/cfallocatorreallocatetyped(_:_:_:_:_:).md)
- [CFAttributedStringGetBidiLevelsAndResolvedDirections(_:_:_:_:_:)](corefoundation/cfattributedstringgetbidilevelsandresolveddirections(_:_:_:_:_:).md)
- [CFBundleCopyLocalizedStringForLocalizations(_:_:_:_:_:)](corefoundation/cfbundlecopylocalizedstringforlocalizations(_:_:_:_:_:).md)
- [CFBundleIsArchitectureLoadable(_:)](corefoundation/cfbundleisarchitectureloadable(_:).md)
- [CFBundleIsExecutableLoadable(_:)](corefoundation/cfbundleisexecutableloadable(_:).md)
- [CFBundleIsExecutableLoadableForURL(_:)](corefoundation/cfbundleisexecutableloadableforurl(_:).md)
- [CFCopyHomeDirectoryURL()](corefoundation/cfcopyhomedirectoryurl().md)
- [CFDateFormatterCreateISO8601Formatter(_:_:)](corefoundation/cfdateformattercreateiso8601formatter(_:_:).md)
- [CFFileSecurityClearProperties(_:_:)](corefoundation/cffilesecurityclearproperties(_:_:).md)
- [CFFileSecurityCopyAccessControlList(_:_:)](corefoundation/cffilesecuritycopyaccesscontrollist(_:_:).md)
- [CFFileSecurityCopyGroupUUID(_:_:)](corefoundation/cffilesecuritycopygroupuuid(_:_:).md)
- [CFFileSecurityCopyOwnerUUID(_:_:)](corefoundation/cffilesecuritycopyowneruuid(_:_:).md)
