Creates a URL from a given directory or file.
SDKs
- iOS 2.0–7.0Deprecated
- macOS 10.0–10.9Deprecated
- Mac Catalyst 13.0–13.0Deprecated
- tvOS 9.0–9.0Deprecated
- watchOS 2.0–2.0Deprecated
Framework
- Core Foundation
Declaration
CFURLRef CFURLCreateFromFSRef(CFAllocator Ref allocator, const struct FSRef *fsRef);
Parameters
allocator
The allocator to use to allocate memory for the new
CFURL
object. PassNULL
ork
to use the current default allocator.CFAllocator Default fsRef
The file or directory representing the URL.
Return Value
A new CFURL
object. Ownership follows the create rule. See The Create Rule.