<!--
{
  "documentType" : "article",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/core-foundation-functions",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Core Foundation Functions"
}
-->

# Core Foundation Functions

## Topics

### Functions

[`func CFAllocatorAllocateBytes(CFAllocator!, CFIndex, CFOptionFlags) -> UnsafeMutableRawPointer!`](/documentation/CoreFoundation/CFAllocatorAllocateBytes(_:_:_:))

[`func CFAllocatorAllocateTyped(CFAllocator!, CFIndex, CFAllocatorTypeID, CFOptionFlags) -> UnsafeMutableRawPointer!`](/documentation/CoreFoundation/CFAllocatorAllocateTyped(_:_:_:_:))

[`func CFAllocatorReallocateBytes(CFAllocator!, UnsafeMutableRawPointer!, CFIndex, CFOptionFlags) -> UnsafeMutableRawPointer!`](/documentation/CoreFoundation/CFAllocatorReallocateBytes(_:_:_:_:))

[`func CFAllocatorReallocateTyped(CFAllocator!, UnsafeMutableRawPointer!, CFIndex, CFAllocatorTypeID, CFOptionFlags) -> UnsafeMutableRawPointer!`](/documentation/CoreFoundation/CFAllocatorReallocateTyped(_:_:_:_:_:))

[`func CFAttributedStringGetBidiLevelsAndResolvedDirections(CFAttributedString!, CFRange, Int8, UnsafeMutablePointer<UInt8>!, UnsafeMutablePointer<UInt8>!) -> Bool`](/documentation/CoreFoundation/CFAttributedStringGetBidiLevelsAndResolvedDirections(_:_:_:_:_:))

[`extern CFTypeRefCFAutorelease(CFTypeRef arg);`](/documentation/CoreFoundation/CFAutorelease)

[`func CFBundleCopyLocalizedStringForLocalizations(CFBundle!, CFString!, CFString!, CFString!, CFArray!) -> CFString!`](/documentation/CoreFoundation/CFBundleCopyLocalizedStringForLocalizations(_:_:_:_:_:))

Returns a localized string from a bundle’s strings file.

[`func CFBundleIsArchitectureLoadable(cpu_type_t) -> Bool`](/documentation/CoreFoundation/CFBundleIsArchitectureLoadable(_:))

[`func CFBundleIsExecutableLoadable(CFBundle!) -> Bool`](/documentation/CoreFoundation/CFBundleIsExecutableLoadable(_:))

[`func CFBundleIsExecutableLoadableForURL(CFURL!) -> Bool`](/documentation/CoreFoundation/CFBundleIsExecutableLoadableForURL(_:))

[`func CFCopyHomeDirectoryURL() -> CFURL!`](/documentation/CoreFoundation/CFCopyHomeDirectoryURL())

[`func CFDateFormatterCreateISO8601Formatter(CFAllocator!, CFISO8601DateFormatOptions) -> CFDateFormatter!`](/documentation/CoreFoundation/CFDateFormatterCreateISO8601Formatter(_:_:))

[`func CFFileSecurityClearProperties(CFFileSecurity!, CFFileSecurityClearOptions) -> Bool`](/documentation/CoreFoundation/CFFileSecurityClearProperties(_:_:))

Clears properties from a `CFFileSecurityRef` object.

[`func CFFileSecurityCopyAccessControlList(CFFileSecurity!, UnsafeMutablePointer<acl_t?>!) -> Bool`](/documentation/CoreFoundation/CFFileSecurityCopyAccessControlList(_:_:))

Copies the access control list associated with a `CFFileSecurityRef` object.

[`func CFFileSecurityCopyGroupUUID(CFFileSecurity!, UnsafeMutablePointer<Unmanaged<CFUUID>?>!) -> Bool`](/documentation/CoreFoundation/CFFileSecurityCopyGroupUUID(_:_:))

Copies the group UUID associated with a `CFFileSecurityRef` object.

[`func CFFileSecurityCopyOwnerUUID(CFFileSecurity!, UnsafeMutablePointer<Unmanaged<CFUUID>?>!) -> Bool`](/documentation/CoreFoundation/CFFileSecurityCopyOwnerUUID(_:_:))

Copies the owner UUID associated with a `CFFileSecurityRef` object.

[`func CFFileSecurityCreate(CFAllocator!) -> CFFileSecurity!`](/documentation/CoreFoundation/CFFileSecurityCreate(_:))

Creates a `CFFileSecurityRef` object.

[`func CFFileSecurityCreateCopy(CFAllocator!, CFFileSecurity!) -> CFFileSecurity!`](/documentation/CoreFoundation/CFFileSecurityCreateCopy(_:_:))

Creates a copy of a `CFFileSecurityRef` object.

[`func CFFileSecurityGetGroup(CFFileSecurity!, UnsafeMutablePointer<gid_t>!) -> Bool`](/documentation/CoreFoundation/CFFileSecurityGetGroup(_:_:))

Gets the group ID associated with a `CFFileSecurityRef` object

[`func CFFileSecurityGetMode(CFFileSecurity!, UnsafeMutablePointer<mode_t>!) -> Bool`](/documentation/CoreFoundation/CFFileSecurityGetMode(_:_:))

Gets the file mode associated with a `CFFileSecurityRef` object.

[`func CFFileSecurityGetOwner(CFFileSecurity!, UnsafeMutablePointer<uid_t>!) -> Bool`](/documentation/CoreFoundation/CFFileSecurityGetOwner(_:_:))

Gets the owner ID associated with a `CFFileSecurityRef` object.

[`func CFFileSecurityGetTypeID() -> CFTypeID`](/documentation/CoreFoundation/CFFileSecurityGetTypeID())

Returns the type identifier for the `CFFileSecurityRef` opaque type.

[`func CFFileSecuritySetAccessControlList(CFFileSecurity!, acl_t!) -> Bool`](/documentation/CoreFoundation/CFFileSecuritySetAccessControlList(_:_:))

Sets the access control list associated with a `CFFileSecurityRef` object.

[`func CFFileSecuritySetGroup(CFFileSecurity!, gid_t) -> Bool`](/documentation/CoreFoundation/CFFileSecuritySetGroup(_:_:))

Sets the group ID associated with a `CFFileSecurityRef` object.

[`func CFFileSecuritySetGroupUUID(CFFileSecurity!, CFUUID!) -> Bool`](/documentation/CoreFoundation/CFFileSecuritySetGroupUUID(_:_:))

Sets the group UUID associated with a `CFFileSecurityRef` object.

[`func CFFileSecuritySetMode(CFFileSecurity!, mode_t) -> Bool`](/documentation/CoreFoundation/CFFileSecuritySetMode(_:_:))

Sets the file mode associated with a `CFFileSecurityRef` object.

[`func CFFileSecuritySetOwner(CFFileSecurity!, uid_t) -> Bool`](/documentation/CoreFoundation/CFFileSecuritySetOwner(_:_:))

Sets the owner ID associated with a `CFFileSecurityRef` object.

[`func CFFileSecuritySetOwnerUUID(CFFileSecurity!, CFUUID!) -> Bool`](/documentation/CoreFoundation/CFFileSecuritySetOwnerUUID(_:_:))

Sets the owner UUID associated with a `CFFileSecurityRef` object.

[`func CFReadStreamCopyDispatchQueue(CFReadStream!) -> dispatch_queue_t!`](/documentation/CoreFoundation/CFReadStreamCopyDispatchQueue(_:))

[`func CFReadStreamSetDispatchQueue(CFReadStream!, dispatch_queue_t!)`](/documentation/CoreFoundation/CFReadStreamSetDispatchQueue(_:_:))

[`func CFRunLoopTimerGetTolerance(CFRunLoopTimer!) -> CFTimeInterval`](/documentation/CoreFoundation/CFRunLoopTimerGetTolerance(_:))

[`func CFRunLoopTimerSetTolerance(CFRunLoopTimer!, CFTimeInterval)`](/documentation/CoreFoundation/CFRunLoopTimerSetTolerance(_:_:))

[`extern CFStringRefCFStringCreateStringWithValidatedFormat(CFAllocatorRef alloc, CFDictionaryRef formatOptions, CFStringRef validFormatSpecifiers, CFStringRef format, CFErrorRef*errorPtr, ...);`](/documentation/CoreFoundation/CFStringCreateStringWithValidatedFormat)

[`extern CFStringRefCFStringCreateStringWithValidatedFormatAndArguments(CFAllocatorRef alloc, CFDictionaryRef formatOptions, CFStringRef validFormatSpecifiers, CFStringRef format, va_list arguments, CFErrorRef*errorPtr);`](/documentation/CoreFoundation/CFStringCreateStringWithValidatedFormatAndArguments)

[`func CFURLEnumeratorCreateForDirectoryURL(CFAllocator!, CFURL!, CFURLEnumeratorOptions, CFArray!) -> CFURLEnumerator!`](/documentation/CoreFoundation/CFURLEnumeratorCreateForDirectoryURL(_:_:_:_:))

Creates and returns a directory enumerator with provided enumerator behavior options and properties to be prefetched.

[`func CFURLEnumeratorCreateForMountedVolumes(CFAllocator!, CFURLEnumeratorOptions, CFArray!) -> CFURLEnumerator!`](/documentation/CoreFoundation/CFURLEnumeratorCreateForMountedVolumes(_:_:_:))

Creates and returns a volume enumerator with provided enumerator behavior options and properties to be prefetched.

[`func CFURLEnumeratorGetDescendentLevel(CFURLEnumerator!) -> CFIndex`](/documentation/CoreFoundation/CFURLEnumeratorGetDescendentLevel(_:))

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

[`func CFURLEnumeratorGetNextURL(CFURLEnumerator!, UnsafeMutablePointer<Unmanaged<CFURL>?>!, UnsafeMutablePointer<Unmanaged<CFError>?>!) -> CFURLEnumeratorResult`](/documentation/CoreFoundation/CFURLEnumeratorGetNextURL(_:_:_:))

Advances an enumerator to the next URL.

[`func CFURLEnumeratorGetSourceDidChange(CFURLEnumerator!) -> Bool`](/documentation/CoreFoundation/CFURLEnumeratorGetSourceDidChange(_:))

This function is unimplemented, so it performs no operation.

[`func CFURLEnumeratorGetTypeID() -> CFTypeID`](/documentation/CoreFoundation/CFURLEnumeratorGetTypeID())

Returns the opaque type identifier for the CFURLEnumerator opaque type.

[`func CFURLEnumeratorSkipDescendents(CFURLEnumerator!)`](/documentation/CoreFoundation/CFURLEnumeratorSkipDescendents(_:))

Tells a recursive enumerator not to descend into the directory at the URL that was returned by the most recent call to the [`CFURLEnumeratorGetNextURL(_:_:_:)`](/documentation/CoreFoundation/CFURLEnumeratorGetNextURL(_:_:_:)) function.

[`func CFURLIsFileReferenceURL(CFURL!) -> Bool`](/documentation/CoreFoundation/CFURLIsFileReferenceURL(_:))

[`func CFWriteStreamCopyDispatchQueue(CFWriteStream!) -> dispatch_queue_t!`](/documentation/CoreFoundation/CFWriteStreamCopyDispatchQueue(_:))

[`func CFWriteStreamSetDispatchQueue(CFWriteStream!, dispatch_queue_t!)`](/documentation/CoreFoundation/CFWriteStreamSetDispatchQueue(_:_:))



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)