---
title: "CFURLEnumeratorGetNextURL(_:_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfurlenumeratorgetnexturl(_:_:_:)"
---

# CFURLEnumeratorGetNextURL(_:_:_:)

Advances an enumerator to the next URL.

## Declaration

```swift
func CFURLEnumeratorGetNextURL(_ enumerator: CFURLEnumerator!, _ url: UnsafeMutablePointer<Unmanaged<CFURL>?>!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> CFURLEnumeratorResult
```

## Parameters

- `enumerator`: The enumerator.
- `url`: Contains the next URL if this function returns doc://com.apple.corefoundation/documentation/CoreFoundation/CFURLEnumeratorResult/success.
- `error`: Contains error information if this function returns doc://com.apple.corefoundation/documentation/CoreFoundation/CFURLEnumeratorResult/error. Error information is retained and must be released. Can be NULL.

## Return Value

Return Value The result of advancing the enumerator.

## Discussion

Discussion If this function returns CFURLEnumeratorResult.end, the enumeration has finished. A return value of CFURLEnumeratorResult.error does not imply that the enumeration has finished. If this function returns CFURLEnumeratorResult.error, the user info dictionary of error is populated with the following entries (when possible): The kCFErrorUnderlyingErrorKey entry is populated with the underlying error if the underlying error is not in the kCFErrorDomainCocoa domain. The NSURLErrorKey entry is populated with the URL that caused the error, as a CFURL object. The NSFilePathErrorKey entry is populated with the file path that caused the error, as a CFString object.

## See Also

### Related Documentation

- [CFURLEnumeratorResult](corefoundation/cfurlenumeratorresult.md)

### 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)
