Deprecated CFURL Functions

A function identified as deprecated has been superseded and may become unsupported in the future.

Deprecated in iOS 7.0

CFURLCreateFromFSRef

Creates a URL from a given directory or file. (Deprecated in iOS 7.0.)

CFURLRef CFURLCreateFromFSRef (
   CFAllocatorRef     allocator,
   const struct FSRef *fsRef
);
Parameters
allocator

The allocator to use to allocate memory for the new CFURL object. Pass NULL or kCFAllocatorDefault to use the current default allocator.

fsRef

The file or directory representing the URL.

Return Value

A new CFURL object. Ownership follows the create rule. See “The Create Rule” in Memory Management Programming Guide for Core Foundation.

Availability
  • Available in iOS 2.0 and later.
  • Deprecated in iOS 7.0.
Declared In
CFURL.h

CFURLGetFSRef

Converts a given URL to a file or directory object. (Deprecated in iOS 7.0.)

Boolean CFURLGetFSRef (
   CFURLRef     url,
   struct FSRef *fsRef
);
Parameters
url

The CFURL object to convert to a file or directory object.

fsRef

Upon return, contains the file or directory object representing url.

Return Value

true if the conversion was successful, otherwise false.

Special Considerations

The function cannot create an FSRef object if any of the leading path parts specified by url is an alias. The function can, however, traverse symbolic links.

Availability
  • Available in iOS 2.0 and later.
  • Deprecated in iOS 7.0.
Related Sample Code
Declared In
CFURL.h