Function

CFURLGetFSRef

Converts a given URL to a file or directory object.

Declaration

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.

Discussion

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.

See Also

Converting URLs to Other Representations

CFURLCreateData

Creates a CFData object containing the content of a given URL.

CFURLCreateStringByAddingPercentEscapes

Creates a copy of a string, replacing certain characters with the equivalent percent escape sequence based on the specified encoding.

Deprecated
CFURLCreateStringByReplacingPercentEscapes

Creates a new string by replacing any percent escape sequences with their character equivalent.

CFURLCreateStringByReplacingPercentEscapesUsingEncoding

Creates a new string by replacing any percent escape sequences with their character equivalent.

Deprecated
CFURLGetFileSystemRepresentation

Fills a buffer with the file system's native string representation of a given URL's path.

CFURLGetString

Returns the URL as a CFString object.