| Derived from | |
| Framework | CoreFoundation/CoreFoundation.h |
| Declared in | CFURL.h |
CFURL provides facilities for creating, parsing, and dereferencing URL strings. CFURL is useful to applications that need to use URLs to access resources, including local files.
A CFURL object is composed of two parts—a base URL, which can be NULL, and a string that is resolved relative to the base URL. A CFURL object whose string is fully resolved without a base URL is considered absolute; all others are considered relative.
CFURL fails to create an object if the string passed is not well-formed (that is, if it does not comply with RFC 2396). Examples of cases that will not succeed are strings containing space characters and high-bit characters. If a function fails to create a CFURL object, it returns NULL, which you must be prepared to handle. If you create CFURL objects using file system paths, you should use the CFURLCreateFromFileSystemRepresentation and CFURLCreateFromFileSystemRepresentationRelativeToBase functions, which handle the subtle differences between URL paths and file system paths.
For functions that read and write data from a URL, see Core Foundation URL Access Utilities Reference
CFURL is “toll-free bridged” with its Cocoa Foundation counterpart, NSURL. This means that the Core Foundation type is interchangeable in function or method calls with the bridged Foundation object. In other words, in a method where you see an NSURL * parameter, you can pass in a CFURLRef, and in a function where you see a CFURLRef parameter, you can pass in an NSURL instance. This also applies to concrete subclasses of NSURL. See Integrating Carbon and Cocoa in Your Application for more information on toll-free bridging.
CFURLCopyAbsoluteURL
CFURLCreateAbsoluteURLWithBytes
CFURLCreateByResolvingBookmarkData
CFURLCreateCopyAppendingPathComponent
CFURLCreateCopyAppendingPathExtension
CFURLCreateCopyDeletingLastPathComponent
CFURLCreateCopyDeletingPathExtension
CFURLCreateFilePathURL
CFURLCreateFileReferenceURL
CFURLCreateFromFileSystemRepresentation
CFURLCreateFromFileSystemRepresentationRelativeToBase
CFURLCreateFromFSRef
CFURLCreateWithBytes
CFURLCreateWithFileSystemPath
CFURLCreateWithFileSystemPathRelativeToBase
CFURLCreateWithString
CFURLCanBeDecomposed
CFURLCopyFileSystemPath
CFURLCopyFragment
CFURLCopyHostName
CFURLCopyLastPathComponent
CFURLCopyNetLocation
CFURLCopyParameterString
CFURLCopyPassword
CFURLCopyPath
CFURLCopyPathExtension
CFURLCopyQueryString
CFURLCopyResourceSpecifier
CFURLCopyScheme
CFURLCopyStrictPath
CFURLCopyUserName
CFURLGetPortNumber
CFURLHasDirectoryPath
CFURLCreateData
CFURLCreateStringByAddingPercentEscapes
CFURLCreateStringByReplacingPercentEscapes
CFURLCreateStringByReplacingPercentEscapesUsingEncoding
CFURLGetFileSystemRepresentation
CFURLGetFSRef
CFURLGetString
CFURLClearResourcePropertyCache
CFURLClearResourcePropertyCacheForKey
CFURLCopyResourcePropertiesForKeys
CFURLCopyResourcePropertyForKey
CFURLCreateResourcePropertiesForKeysFromBookmarkData
CFURLCreateResourcePropertyForKeyFromBookmarkData
CFURLSetResourcePropertiesForKeys
CFURLSetResourcePropertyForKey
CFURLSetTemporaryResourcePropertyForKey
CFURLCreateBookmarkData
CFURLCreateBookmarkDataFromAliasRecord
CFURLCreateBookmarkDataFromFile
CFURLWriteBookmarkDataToFile
Determines if the given URL conforms to RFC 1808 and therefore can be decomposed.
Boolean CFURLCanBeDecomposed ( CFURLRef anURL );
The CFURL object to test.
true if anURL conforms to RFC 1808, false otherwise.
If a CFURL object can be decomposed, you can retrieve separately each of the four components (scheme, net location, path, and resource specifier), as well as the base URL.
Relative URLs are permitted to have only paths (or a variety of other configurations); these are considered decomposable if their base URL is decomposable. If no base URL is present, they are considered decomposable.
CFURL.hClears all cached resource property values of a given URL.
void CFURLClearResourcePropertyCache ( CFURLRef url );
The URL.
CFURL.hDiscards a cached property value for a given key of a given URL.
void CFURLClearResourcePropertyCacheForKey ( CFURLRef url, CFStringRef key );
The URL.
The property value key.
CFURL.hCreates a new CFURL object by resolving the relative portion of a URL against its base.
CFURLRef CFURLCopyAbsoluteURL ( CFURLRef relativeURL );
The CFURL object to resolve.
A new CFURL object, or NULL if relativeURL cannot be made absolute. Ownership follows the Create Rule.
CFURL.hReturns the path portion of a given URL.
CFStringRef CFURLCopyFileSystemPath ( CFURLRef anURL, CFURLPathStyle pathStyle );
The CFURL object whose path you want to obtain.
The operating system path style to be used to create the path. See Path Style for a list of possible values.
The URL's path in the format specified by pathStyle. Ownership follows the Create Rule.
This function returns the URL's path as a file system path for a given path style.
CFURL.hReturns the fragment from a given URL.
CFStringRef CFURLCopyFragment ( CFURLRef anURL, CFStringRef charactersToLeaveEscaped );
The CFURL object whose fragment you want to obtain.
Characters whose percent escape sequences, such as %20 for a space character, you want to leave intact. Pass NULL to specify that no percent escapes be replaced, or the empty string (CFSTR("")) to specify that all be replaced.
The fragment, or NULL if no fragment exists. Ownership follows the Create Rule.
A fragment is the text following a "#". These are generally used to indicate locations within a single file. This function removes all percent escape sequences except those for characters specified in charactersToLeaveEscaped.
CFURL.hReturns the host name of a given URL.
CFStringRef CFURLCopyHostName ( CFURLRef anURL );
The CFURL object to examine.
The host name of anURL. Ownership follows the Create Rule.
CFURL.hReturns the last path component of a given URL.
CFStringRef CFURLCopyLastPathComponent ( CFURLRef url );
The CFURL object to examine.
The last path component of url. Ownership follows the Create Rule.
Note that if there is no last path component, this function returns an empty string. In the code sample shown in Listing 1, lastPathComponent is an empty string.
Listing 1 Code sample illustrating CFURLCopyLastPathComponent
CFStringRef urlString = CFSTR("http://www.apple.com"); |
CFURLRef url = CFURLCreateWithString(NULL, urlString, NULL); |
CFStringRef lastPathComponent = CFURLCopyLastPathComponent (url); |
If urlString were created with CFSTR("http://www.apple.com/"), then lastPathComponent would be a CFString object containing the character “/“.
See also CFURLCopyPathExtension.
CFURL.hReturns the net location portion of a given URL.
CFStringRef CFURLCopyNetLocation ( CFURLRef anURL );
The CFURL object to examine.
The net location of anURL, or NULL if the URL cannot be decomposed (doesn't conform to RFC 1808). Ownership follows the Create Rule.
The URL net location is the portion of the URL that identifies the network address of the resource. It includes the optional username and password, as well as the target machine’s IP address or host name.
This function leaves any percent escape sequences intact.
CFURL.hReturns the parameter string from a given URL.
CFStringRef CFURLCopyParameterString ( CFURLRef anURL, CFStringRef charactersToLeaveEscaped );
The CFURL object to examine.
Characters whose percent escape sequences, such as %20 for a space character, you want to leave intact. Pass NULL to specify that no percent escapes be replaced, or the empty string (CFSTR("")) to specify that all be replaced.
The parameter string (as defined in RFC 1738), or NULL if no parameter string exists. Ownership follows the Create Rule.
This function removes all percent escape sequences except those for characters specified in charactersToLeaveEscaped.
CFURL.hReturns the password of a given URL.
CFStringRef CFURLCopyPassword ( CFURLRef anURL );
The CFURL object to examine.
The password, or NULL if no password exists. In some cases, this function may also return the empty string (CFSTR("")) if no password exists. You should consider NULL and the empty string to be equivalent. Ownership follows the Create Rule.
CFURL.hReturns the path portion of a given URL.
CFStringRef CFURLCopyPath ( CFURLRef anURL );
The CFURL object to examine.
The path of anURL, or NULL if the URL cannot be decomposed (doesn't conform to RFC 1808). Ownership follows the Create Rule.
This function does not resolve the URL against its base and replaces all percent escape sequences. This function's return value includes any leading slash (giving the path the normal POSIX appearance), if present. If this behavior is not appropriate, use CFURLCopyStrictPath whose return value omits any leading slash. You may also want to use the function CFURLCopyFileSystemPath, which returns the URL's path as a file system path for the given path style. If the path is to be passed to file system calls, you may also want to use the function CFURLGetFileSystemRepresentation, which returns a C string.
CFURL.hReturns the path extension of a given URL.
CFStringRef CFURLCopyPathExtension ( CFURLRef url );
The CFURL object to examine.
The path extension of url, or NULL if no extension exists. Ownership follows the Create Rule.
The path extension is the portion of the last path component which follows the final period, if there is one. For example, for http:/www.apple.com/developer/macosx.today.html, the extension is html, and for http:/www.apple.com/developer, there is no path extension.
See also CFURLCopyLastPathComponent.
CFURL.hReturns the query string of a given URL.
CFStringRef CFURLCopyQueryString ( CFURLRef anURL, CFStringRef charactersToLeaveEscaped );
The CFURL object to examine.
Characters whose percent escape sequences, such as %20 for a space character, you want to leave intact. Pass NULL to specify that no percent escapes be replaced, or the empty string (CFSTR("")) to specify that all be replaced.
The query string, or NULL if no parameter string exists. Ownership follows the Create Rule.
This function removes all percent escape sequences except those for characters specified in charactersToLeaveEscaped.
CFURL.hReturns any number of resource property values of a URL as a dictionary.
CFDictionaryRef CFURLCopyResourcePropertiesForKeys ( CFURLRef url, CFArrayRef keys, CFErrorRef *error );
The URL.
The property value keys that values are requested for.
The error that occurred in the case that the bookmark data cannot be created.
A dictionary of resource property values, or NULL if an error occurs.
Values are fetched synchronously from the resource backing store unless they are already cached.
CFURL.hReturns the value of a given resource property of a given URL.
Boolean CFURLCopyResourcePropertyForKey ( CFURLRef url, CFStringRef key, void *propertyValueTypeRefPtr, CFErrorRef *error );
The URL.
The property value key that the value is requested for.
The pointer that is populated with the result.
The error that occurred in the case that the bookmark data cannot be created.
true if propertyValueTypeRefPtr is successfully populated; otherwise, false.
Values are fetched synchronously from the resource backing store unless they are already cached.
CFURL.hReturns any additional resource specifiers after the path.
CFStringRef CFURLCopyResourceSpecifier ( CFURLRef anURL );
The CFURL object to examine.
The resource specifiers. Ownership follows the Create Rule.
This function leaves any percent escape sequences intact. For decomposable URLs, this function returns everything after the path. For URLs that cannot be decomposed, this function returns everything except the scheme itself.
CFURL.hReturns the scheme portion of a given URL.
CFStringRef CFURLCopyScheme ( CFURLRef anURL );
The CFURL object to examine.
The scheme of anURL. Ownership follows the Create Rule.
The URL scheme is the portion of the URL specifying the transport type. For example http, ftp, and rtsp are schemes. This function leaves any percent escape sequences intact.
CFURL.hReturns the path portion of a given URL.
CFStringRef CFURLCopyStrictPath ( CFURLRef anURL, Boolean *isAbsolute );
The CFURL object to examine.
On return, indicates whether the path of anURL is absolute.
The path of anURL, or NULL if the URL cannot be decomposed (doesn't conform to RFC 1808). Ownership follows the Create Rule.
This function does not resolve the URL against its base and replaces all percent escape sequences. This function's return value does not include a leading slash and uses isAbsolute to report whether the URL's path is absolute. If this behavior is not appropriate, use the CFURLCopyPath function whose return value includes the leading slash (giving the path the normal POSIX appearance). You may also want to use the CFURLCopyFileSystemPath function, which returns the URL's path as a file system path for the given path style. If the path is to be passed to file system calls, you may also want to use the function CFURLGetFileSystemRepresentation, which returns a C string.
CFURL.hReturns the user name from a given URL.
CFStringRef CFURLCopyUserName ( CFURLRef anURL );
The CFURL object to examine.
The user name, or NULL if no user name exists. In some cases, this function may also return the empty string (CFSTR("")) if no username exists. You should consider NULL and the empty string to be equivalent. Ownership follows the Create Rule.
CFURL.hCreates a new CFURL object by resolving the relative portion of a URL, specified as bytes, against its given base URL.
CFURLRef CFURLCreateAbsoluteURLWithBytes ( CFAllocatorRef alloc, const UInt8 *relativeURLBytes, CFIndex length, CFStringEncoding encoding, CFURLRef baseURL, Boolean useCompatibilityMode );
The allocator to use to allocate memory for the new CFURL object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The character bytes that represent a relative URL to convert into a CFURL object.
The number of bytes in relativeURLBytes.
The string encoding of the relativeURLBytes string. This encoding is also used to interpret percent escape sequences.
The URL to which relativeURLBytes is relative.
If true, the rules historically used on the web are used to resolve the string specified by the relativeURLBytes parameter against baseURL. These rules are generally listed in the RFC as optional or alternate interpretations. Otherwise, the strict rules from the RFC are used.
A new CFURL object, or NULL if relativeURLBytes cannot be made absolute. Ownership follows the Create Rule.
CFURL.hReturns bookmark data for a URL, created with specified options and resource values.
CFDataRef CFURLCreateBookmarkData ( CFAllocatorRef allocator, CFURLRef url, CFURLBookmarkCreationOptions options, CFArrayRef resourcePropertiesToInclude, CFURLRef relativeToURL, CFErrorRef *error );
The allocator to use to allocate memory for the new CFURL object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The URL that bookmark data is being created for.
Options taken into account when creating the bookmark data.
An array of names of URL resource properties.
The URL that the bookmark data is relative to.
The error that occurred in the case that the bookmark data cannot be created.
The bookmark data for the URL.
CFURL.hInitializes and returns bookmark data derived from an alias record.
CFDataRef CFURLCreateBookmarkDataFromAliasRecord ( CFAllocatorRef allocatorRef, CFDataRef aliasRecordDataRef );
The allocator to use to allocate memory for the new CFURL object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The alias record.
The bookmark data for the alias record.
CFURL.hInitializes and returns bookmark data derived from a file pointed to by a specified URL.
CFDataRef CFURLCreateBookmarkDataFromFile ( CFAllocatorRef allocator, CFURLRef fileURL, CFErrorRef *errorRef );
The allocator to use to allocate memory for the new CFURL object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The file URL.
The error that occurred in the case that the bookmark data cannot be created.
The bookmark data for the file, or NULL if an error occurs.
CFURL.hReturns a new URL made by resolving bookmark data.
CFURLRef CFURLCreateByResolvingBookmarkData ( CFAllocatorRef allocator, CFDataRef bookmark, CFURLBookmarkResolutionOptions options, CFURLRef relativeToURL, CFArrayRef resourcePropertiesToInclude, Boolean *isStale, CFErrorRef *error );
The allocator to use to allocate memory for the new CFURL object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The bookmark data the URL is derived from.
Options taken into account when resolving the bookmark data.
The base URL that the bookmark data is relative to. Can be NULL.
An array of resource properties to include when creating the URL. Can be NULL.
If YES, the bookmark data is stale.
The error that occurred in the case that the URL cannot be created.
A new URL made by resolving bookmark, or NULL if an error occurs.
CFURL.hCreates a copy of a given URL and appends a path component.
CFURLRef CFURLCreateCopyAppendingPathComponent ( CFAllocatorRef allocator, CFURLRef url, CFStringRef pathComponent, Boolean isDirectory );
The allocator to use to allocate memory for the new CFURL object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The CFURL object to which to append a path component.
The path component to append to url.
A Boolean value that specifies whether the string is treated as a directory path when resolving against relative path components. Pass true if the new component indicates a directory, false otherwise.
A copy of url appended with pathComponent. Ownership follows the Create Rule.
The isDirectory argument specifies whether or not the new path component points to a file or a to directory. Note that the URL syntax for a directory and for a file at otherwise the same location are slightly different—directory URLs must end in “/”. If you have the URL http://www.apple.com/foo/ and you append the path component bar, then if isDirectory is YES then the resulting URL is http://www.apple.com/foo/bar/, whereas if isDirectory is NO then the resulting URL is http://www.apple.com/foo/bar. This difference is particularly important if you resolve another URL against this new URL. file.html relative to http://www.apple.com/foo/bar is http://www.apple.com/foo/file.html, whereas file.html relative to http://www.apple.com/foo/bar/ is http://www.apple.com/foo/bar/file.html.
CFURL.hCreates a copy of a given URL and appends a path extension.
CFURLRef CFURLCreateCopyAppendingPathExtension ( CFAllocatorRef allocator, CFURLRef url, CFStringRef extension );
The allocator to use to allocate memory for the new CFURL object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The CFURL object to which to append a path extension.
The extension to append to url.
A copy of url appended with extension. Ownership follows the Create Rule.
CFURL.hCreates a copy of a given URL with the last path component deleted.
CFURLRef CFURLCreateCopyDeletingLastPathComponent ( CFAllocatorRef allocator, CFURLRef url );
The allocator to use to allocate memory for the new CFURL object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The CFURL object whose last path component you want to delete.
A copy of url with the last path component deleted. Ownership follows the Create Rule.
CFURL.hCreates a copy of a given URL with its last path extension removed.
CFURLRef CFURLCreateCopyDeletingPathExtension ( CFAllocatorRef allocator, CFURLRef url );
The allocator to use to allocate memory for the new CFURL object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The CFURL object whose path extension you want to delete.
A copy of url with its last path extension removed. Ownership follows the Create Rule.
CFURL.hCreates a CFData object containing the content of a given URL.
CFDataRef CFURLCreateData ( CFAllocatorRef allocator, CFURLRef url, CFStringEncoding encoding, Boolean escapeWhitespace );
The allocator to use to allocate memory for the new CFData object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The URL to convert into a CFData object.
The string encoding to use when converting url into a CFData object.
true if you want to escape whitespace characters in the URL, false otherwise.
A new CFData object containing the content of url. Ownership follows the Create Rule.
This function escapes any character that is not 7-bit ASCII with the byte-code for the given encoding. If escapeWhitespace is true, whitespace characters (' ', '\t', '\r', '\n') will be escaped as well. This is desirable if you want to embed the URL into a larger text stream like HTML.
CFURL.hInitializes and returns a newly created CFURL object as a file URL with a specified path.
CFURLRef CFURLCreateFilePathURL ( CFAllocatorRef allocator, CFURLRef url, CFErrorRef *error );
The allocator to use to allocate memory for the new CFURL object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The path.
The error that occurred in the case that the URL cannot be created.
A CFURL object initialized with url, or NULL if an error occurs.
CFURL.hReturns a new file reference URL that points to the same resource as a specified URL.
CFURLRef CFURLCreateFileReferenceURL ( CFAllocatorRef allocator, CFURLRef url, CFErrorRef *error );
The allocator to use to allocate memory for the new CFURL object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The URL.
The error that occurred in the case that the URL cannot be created.
The new file reference URL, or NULL if an error occurs.
CFURL.hCreates a new CFURL object for a file system entity using the native representation.
CFURLRef CFURLCreateFromFileSystemRepresentation ( CFAllocatorRef allocator, const UInt8 *buffer, CFIndex bufLen, Boolean isDirectory );
The allocator to use to allocate memory for the new CFURL object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The character bytes to convert into a CFURL object. This should be the path as you would use in POSIX function calls.
The number of bytes in the buffer.
A Boolean value that specifies whether the string is treated as a directory path when resolving against relative path components—true if the pathname indicates a directory, false otherwise.
A new CFURL object. Ownership follows the Create Rule.
CFURL.hCreates a CFURL object from a native character string path relative to a base URL.
CFURLRef CFURLCreateFromFileSystemRepresentationRelativeToBase ( CFAllocatorRef allocator, const UInt8 *buffer, CFIndex bufLen, Boolean isDirectory, CFURLRef baseURL );
The allocator to use to allocate memory for the new CFURL object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The character bytes to convert into a CFURL object. This should be the path as you would use in POSIX function calls.
The number of bytes in the buffer.
A Boolean value that specifies whether the string is treated as a directory path when resolving against relative path components. Pass true if the pathname indicates a directory, false otherwise.
The URL against which to resolve the path.
A new CFURL object. Ownership follows the Create Rule.
This function takes a path name in the form of a native character string, resolves it against a base URL, and returns a new CFURL object containing the result.
CFURL.hCreates a URL from a given directory or file.
CFURLRef CFURLCreateFromFSRef ( CFAllocatorRef allocator, const struct FSRef *fsRef );
The allocator to use to allocate memory for the new CFURL object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The file or directory representing the URL.
A new CFURL object. Ownership follows the Create Rule.
CFURL.hReturns the resource values for properties identified by a specified array of keys contained in specified bookmark data.
CFDictionaryRef CFURLCreateResourcePropertiesForKeysFromBookmarkData ( CFAllocatorRef allocator, CFArrayRef resourcePropertiesToReturn, CFDataRef bookmark );
The allocator to use to allocate memory for the new CFURL object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
An array of names of URL resource properties.
The bookmark data the resource values are derived from.
A dictionary of the requested resource values contained in bookmarkData.
This function does not attempt to resolve the bookmark data or perform I/O.
CFURL.hReturns the value of a resource property from specified bookmark data.
CFTypeRef CFURLCreateResourcePropertyForKeyFromBookmarkData ( CFAllocatorRef allocator, CFStringRef resourcePropertyKey, CFDataRef bookmark );
The allocator to use to allocate memory for the new CFURL object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The resource property key.
The bookmark data the resource value is derived from.
The resource property value.
This function does not attempt to resolve the bookmark data or perform I/O.
CFURL.hCreates a copy of a string, replacing certain characters with the equivalent percent escape sequence based on the specified encoding.
CFStringRef CFURLCreateStringByAddingPercentEscapes ( CFAllocatorRef allocator, CFStringRef originalString, CFStringRef charactersToLeaveUnescaped, CFStringRef legalURLCharactersToBeEscaped, CFStringEncoding encoding );
The allocator to use to allocate memory for the new CFString object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The CFString object to copy.
Characters whose percent escape sequences you want to leave intact. Pass NULL to specify that all escape sequences be replaced.
Legal characters to be escaped. Pass NULL to specify that no legal characters be replaced.
The encoding to use for the translation. If you are uncertain of the correct encoding, you should use UTF-8, which is the encoding designated by RFC 2396 as the correct encoding for use in URLs.
A copy of originalString replacing certain characters. If it does not need to be modified (no percent escape sequences are missing), this function may merely return originalString with its reference count incremented. Ownership follows the Create Rule.
The characters escaped are all characters that are not legal URL characters (based on RFC 2396), plus any characters in legalURLCharactersToBeEscaped, less any characters in charactersToLeaveUnescaped. To simply correct any non-URL characters in an otherwise correct URL string, pass NULL for the allocator, charactersToLeaveEscaped, and legalURLCharactersToBeEscaped parameters, and kCFStringEncodingUTF8 as the encoding parameter.
It may be difficult to use this function to "clean up" unescaped or partially escaped URL strings where sequences are unpredictable and you cannot specify charactersToLeaveUnescaped. Instead, you can "pre-process" a URL string using CFURLCreateStringByReplacingPercentEscapesUsingEncoding then add the escape characters using CFURLCreateStringByAddingPercentEscapes, as shown in the following code fragment.
CFStringRef originalURLString = CFSTR("http://online.store.com/storefront/?request=get-document&doi=10.1175%2F1520-0426(2005)014%3C1157:DODADSS%3E2.0.CO%3B2"); |
CFStringRef preprocessedString = |
CFURLCreateStringByReplacingPercentEscapesUsingEncoding(kCFAllocatorDefault, originalURLString, CFSTR(""), kCFStringEncodingUTF8); |
CFStringRef urlString = |
CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, preprocessedString, NULL, NULL, kCFStringEncodingUTF8); |
url = CFURLCreateWithString(kCFAllocatorDefault, urlString, NULL); |
CFURL.hCreates a new string by replacing any percent escape sequences with their character equivalent.
CFStringRef CFURLCreateStringByReplacingPercentEscapes ( CFAllocatorRef allocator, CFStringRef originalString, CFStringRef charactersToLeaveEscaped );
The allocator to use to allocate memory for the new CFString object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The CFString object to be copied and modified.
Characters whose percent escape sequences, such as %20 for a space character, you want to leave intact. Pass NULL to specify that no percent escapes be replaced, or the empty string (CFSTR("")) to specify that all be replaced.
A new CFString object, or NULL if the percent escapes cannot be converted to characters, assuming UTF-8 encoding. If no characters need to be replaced, this function returns the original string with its reference count incremented. Ownership follows the Create Rule.
CFURL.hCreates a new string by replacing any percent escape sequences with their character equivalent.
CFStringRef CFURLCreateStringByReplacingPercentEscapesUsingEncoding ( CFAllocatorRef allocator, CFStringRef origString, CFStringRef charsToLeaveEscaped, CFStringEncoding encoding );
The allocator to use to allocate memory for the new CFString object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The CFString object to be copied and modified.
Characters whose percent escape sequences, such as %20 for a space character, you want to leave intact. Pass NULL to specify that no percent escapes be replaced, or the empty string (CFSTR("")) to specify that all be replaced.
Specifies the encoding to use when interpreting percent escapes.
A new CFString object, or NULL if the percent escapes cannot be converted to characters, assuming the encoding given by encoding. If no characters need to be replaced, this function returns the original string with its reference count incremented. Ownership follows the Create Rule.
CFURL.hCreates a CFURL object using a given character bytes.
CFURLRef CFURLCreateWithBytes ( CFAllocatorRef allocator, const UInt8 *URLBytes, CFIndex length, CFStringEncoding encoding, CFURLRef baseURL );
The allocator to use to allocate memory for the new CFURL object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The character bytes to convert into a CFURL object.
The number of bytes in URLBytes.
The string encoding of the URLBytes string. This encoding is also used to interpret percent escape sequences.
The URL to which URLBytes is relative. Pass NULL if URLBytes contains an absolute URL or if you want to create a relative URL. If URLBytes contains an absolute URL, this parameter is ignored.
A new CFURL object. Ownership follows the Create Rule.
The specified string encoding will be used both to interpret URLBytes, and to interpret any percent-escapes within the string.
CFURL.hCreates a CFURL object using a local file system path string.
CFURLRef CFURLCreateWithFileSystemPath ( CFAllocatorRef allocator, CFStringRef filePath, CFURLPathStyle pathStyle, Boolean isDirectory );
The allocator to use to allocate memory for the new CFURL object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The path string to convert to a CFURL object.
The operating system path style used in filePath. See Path Style for a list of possible values.
A Boolean value that specifies whether filePath is treated as a directory path when resolving against relative path components. Pass true if the pathname indicates a directory, false otherwise.
A new CFURL object. Ownership follows the Create Rule.
If filePath is not absolute, the resulting URL will be considered relative to the current working directory (evaluated when this function is being invoked).
CFURL.hCreates a CFURL object using a local file system path string relative to a base URL.
CFURLRef CFURLCreateWithFileSystemPathRelativeToBase ( CFAllocatorRef allocator, CFStringRef filePath, CFURLPathStyle pathStyle, Boolean isDirectory, CFURLRef baseURL );
The allocator to use to allocate memory for the new CFURL object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The path string to convert to a CFURL object.
The operating system path style used in the filePath string. See Path Style for a list of possible values.
A Boolean value that specifies whether filePath is treated as a directory path when resolving against relative path components. Pass true if the pathname indicates a directory, false otherwise.
The base URL against which to resolve the filePath.
A new CFURL object. Ownership follows the Create Rule.
This function takes a path name in the form of a CFString object, resolves it against a base URL, and returns a new CFURL object containing the result.
CFURL.hCreates a CFURL object using a given CFString object.
CFURLRef CFURLCreateWithString ( CFAllocatorRef allocator, CFStringRef URLString, CFURLRef baseURL );
The allocator to use to allocate memory for the new CFURL object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The CFString object containing the URL string.
The URL to which URLString is relative. Pass NULL if URLString contains an absolute URL or if you want to create a relative URL. If URLString contains an absolute URL, baseURL is ignored.
A new CFURL object. Ownership follows the Create Rule.
Any escape sequences in URLString will be interpreted using UTF-8.
CFURL.hReturns the base URL of a given URL if it exists.
CFURLRef CFURLGetBaseURL ( CFURLRef anURL );
The CFURL object to examine.
A CFURL object representing the base URL of anURL. Ownership follows the Get Rule.
CFURL.hReturns the range of the specified component in the bytes of a URL.
CFRange CFURLGetByteRangeForComponent ( CFURLRef url, CFURLComponentType component, CFRange *rangeIncludingSeparators );
The URL containing component.
The type of component in anURL whose range you want to obtain. See Component Type for possible values.
Specifies the range of component including the sequences that separate component from the previous and next components. If there is no previous or next components, this function will match the range of the component itself. If anURL does not contain component, rangeIncludingSeparators is set to the location where the component would be inserted.
The range of bytes for component in the buffer returned by the CFURLGetBytes function. If anURL does not contain component, the first part of the returned range is set to kCFNotFound.
This function is intended to be used in conjunction with the CFURLGetBytes function, since the range returned is only applicable to the bytes returned by CFURLGetBytes.
CFURL.hReturns by reference the byte representation of a URL object.
CFIndex CFURLGetBytes ( CFURLRef url, UInt8 *buffer, CFIndex bufferLength );
The URL object to convert to a byte representation.
The buffer where you want the bytes to be placed. If the buffer is of insufficient size, returns -1 and no bytes are placed in buffer. If NULL the needed length is computed and returned. The returned bytes are the original bytes from which the URL was created. If the URL was created from a string, the bytes are the bytes of the string encoded via UTF-8.
The number of bytes in buffer.
Returns the number of bytes in buffer that were filled. If the buffer is of insufficient size, returns -1.
CFURL.hFills a buffer with the file system's native string representation of a given URL's path.
Boolean CFURLGetFileSystemRepresentation ( CFURLRef url, Boolean resolveAgainstBase, UInt8 *buffer, CFIndex maxBufLen );
The CFURL object whose native file system representation you want to obtain.
Pass true to return an absolute path name.
A pointer to a character buffer. On return, the buffer holds the native file system's representation of url. The buffer is null-terminated. This parameter must be at least maxBufLen in size for the file system in question to avoid failures for insufficiently large buffers.
The maximum number of characters that can be written to buffer.
true if successful, false if an error occurred.
No more than maxBufLen bytes are written to buffer. If url requires more than maxBufLen bytes to represent itself, including the terminating null byte, this function returns false. To avoid this possible failure, you should pass a buffer with size of at least the maximum path length for the file system in question.
CFURL.hConverts a given URL to a file or directory object.
Boolean CFURLGetFSRef ( CFURLRef url, struct FSRef *fsRef );
The CFURL object to convert to a file or directory object.
Upon return, contains the file or directory object representing url.
true if the conversion was successful, otherwise false.
The function cannot create an FSRef object if the path specified by url contains an alias. The function can, however, traverse symbolic links.
CFURL.hReturns the port number from a given URL.
SInt32 CFURLGetPortNumber ( CFURLRef anURL );
The CFURL object to examine.
The port number of anURL, or -1 if no port number exists.
CFURL.hReturns the URL as a CFString object.
CFStringRef CFURLGetString ( CFURLRef anURL );
The CFURL object to convert into a CFString object.
A string representation of anURL. Ownership follows the Get Rule.
CFURL.hReturns the type identifier for the CFURL opaque type.
CFTypeID CFURLGetTypeID ( void );
The type identifier for the CFURL opaque type.
CFURL.hDetermines if a given URL's path represents a directory.
Boolean CFURLHasDirectoryPath ( CFURLRef anURL );
The CFURL object to examine.
true if anURL represents a directory, false otherwise.
CFURL.hReturns whether the resource pointed to by a file URL can be reached.
Boolean CFURLResourceIsReachable ( CFURLRef url, CFErrorRef *error );
The URL to check.
The error that occurred in the case that the resource cannot be reached.
true if the resource is reachable; otherwise, false.
CFURL.hSets resource properties of a URL specified by a given dictionary of keys and values.
Boolean CFURLSetResourcePropertiesForKeys ( CFURLRef url, CFDictionaryRef keyedPropertyValues, CFErrorRef *error );
The URL.
A dictionary of resource values to be set.
The error that occurred in the case that one or more resource values cannot be set.
true if all resource values in keyedPropertyValues are successfully set; otherwise, false.
CFURL.hSets the resource property of the URL specified by a given key to a given value.
Boolean CFURLSetResourcePropertyForKey ( CFURLRef url, CFStringRef key, CFTypeRef propertValue, CFErrorRef *error );
The URL.
The name of one of the URL’s resource properties.
The value for the resource property defined by key.
The error that occurred in the case that the resource value cannot be set.
true if the resource property named key is successfully set to value; otherwise, false.
This function writes the new property value out to the backing store.
CFURL.hSets the resource property of the URL specified by a given key to a given value without writing the assignment to the backing store.
void CFURLSetTemporaryResourcePropertyForKey ( CFURLRef url, CFStringRef key, CFTypeRef propertyValue );
The URL.
The name of one of the URL’s resource properties.
The value for the resource property defined by key.
CFURL.hCreates an alias file on disk at a specified location with specified bookmark data.
Boolean CFURLWriteBookmarkDataToFile ( CFDataRef bookmarkRef, CFURLRef fileURL, CFURLBookmarkFileCreationOptions options, CFErrorRef *errorRef );
The bookmark data containing information for the alias file.
The desired location of the alias file.
Options taken into account when creating the alias file.
The error that occurred in the case that the alias file cannot be created.
true if the alias file is successfully created; otherwise, false.
CFURL.hType for bookmark data creation options.
typedef CFOptionFlags CFURLBookmarkCreationOptions;
See “Bookmark Data Creation Options” for possible values.
CFURL.hType for bookmark file creation options.
typedef CFOptionFlags CFURLBookmarkFileCreationOptions;
CFURL.hType for bookmark data resolution options.
typedef CFOptionFlags CFURLBookmarkResolutionOptions;
See “Bookmark Data Resolution Options” for possible values.
CFURL.hA reference to a CFURL object.
typedef const struct __CFURL *CFURLRef;
CFURL.hOptions used when creating bookmark data.
enum {
kCFURLBookmarkCreationPreferFileIDResolutionMask = ( 1UL << 8 ),
kCFURLBookmarkCreationMinimalBookmarkMask = ( 1UL << 9 ),
kCFURLBookmarkCreationSuitableForBookmarkFile = ( 1UL << 10 )
};
kCFURLBookmarkCreationPreferFileIDResolutionMaskOption for specifying that an alias created with the bookmark data prefers resolving with its embedded file ID.
kCFURLBookmarkCreationMinimalBookmarkMaskOption for specifying that an alias created with the bookmark data be created with minimal information, which may make it smaller but still able to resolve in certain ways.
kCFURLBookmarkCreationSuitableForBookmarkFileOption for specifying that the bookmark data include properties required to create Finder alias files.
Options used when resolving bookmark data.
enum {
kCFBookmarkResolutionWithoutUIMask = ( 1UL << 8 ),
kCFBookmarkResolutionWithoutMountingMask = ( 1UL << 9 ),
};
kCFBookmarkResolutionWithoutUIMaskOption for specifying that no UI feedback accompany resolution of the bookmark data.
kCFBookmarkResolutionWithoutMountingMaskOption for specifying that no volume should be mounted during resolution of the bookmark data.
Keys that are applicable to file system URLs.
kCFURLNameKey kCFURLLocalizedNameKey kCFURLIsRegularFileKey kCFURLIsDirectoryKey kCFURLIsSymbolicLinkKey kCFURLIsVolumeKey kCFURLIsPackageKey kCFURLIsSystemImmutableKey kCFURLIsUserImmutableKey kCFURLIsHiddenKey kCFURLHasHiddenExtensionKey kCFURLCreationDateKey kCFURLContentAccessDateKey kCFURLContentModificationDateKey kCFURLAttributeModificationDateKey kCFURLLinkCountKey kCFURLParentDirectoryURLKey kCFURLVolumeURLKey kCFURLTypeIdentifierKey kCFURLLocalizedTypeDescriptionKey kCFURLLabelNumberKey kCFURLLabelColorKey kCFURLLocalizedLabelKey kCFURLEffectiveIconKey kCFURLCustomIconKey
kCFURLNameKeyKey for the resource’s name in the file system, returned as a CFString object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLLocalizedNameKeyKey for the resource’s localized or extension-hidden name, retuned as a CFString object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLIsRegularFileKeyKey for determining whether the resource is a regular file, as opposed to a directory or a symbolic link. Returned as a CFBoolean object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLIsDirectoryKeyKey for determining whether the resource is a directory, returned as a CFBoolean object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLIsSymbolicLinkKeyKey for determining whether the resource is a symbolic link, returned as a CFBoolean object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLIsVolumeKeyKey for determining whether the resource is the root directory of a volume, returned as a CFBoolean object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLIsPackageKeyKey for determining whether the resource is a packaged directory, returned as a CFBoolean object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLIsSystemImmutableKeyKey for determining whether the resource's system immutable bit is set, returned as a CFBoolean object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLIsUserImmutableKeyKey for determining whether the resource's user immutable bit is set, returned as a CFBoolean object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLIsHiddenKeyKey for determining whether the resource is normally not displayed to users, returned as a CFBoolean object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLHasHiddenExtensionKeyKey for determining whether the resource’s extension is normally removed from its localized name, returned as a CFBoolean object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLCreationDateKeyKey for the resource’s creation date, returned as a CFDate object if the volume supports creation dates, or nil if creation dates are unsupported.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLContentAccessDateKeyKey for the last time the resource was accessed, returned as a CFDate object if the volume supports access dates, or nil if access dates are unsupported.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLContentModificationDateKeyKey for the last time the resource was modified, returned as a CFDate object if the volume supports modification dates, or nil if modification dates are unsupported.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLAttributeModificationDateKeyKey for the last time the resource’s attributes were modified, returned as a CFDate object if the volume supports attribute modification dates, or nil if attribute modification dates are unsupported.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLLinkCountKeyKey for the number of hard links to the resource, returned as a CFNumber object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLParentDirectoryURLKeyKey for the parent directory of the resource, returned as a CFURL object, or nil if the resource is the root directory of its volume.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLVolumeURLKeyKey for the root directory of the resource’s volume, returned as a CFURL object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLTypeIdentifierKeyKey for the resource’s uniform type identifier (UTI), returned as a CFString object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLLocalizedTypeDescriptionKeyKey for the resource’s localized type description, returned as a CFString object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLLabelNumberKeyKey for the resource’s label number, returned as a CFNumber object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLLabelColorKeyKey for the resource’s label color, returned as a CFColorRef object, or nil if the resource has no label color.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLLocalizedLabelKeyKey for the resource’s localized label text, returned as a CFString object, or nil if the resource has no localized label text.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLEffectiveIconKeyKey for the resource’s normal icon, returned as a CGImageRef object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLCustomIconKeyKey for the icon stored with the resource, returned as a CGImageRef object, or nil if the resource has no custom icon.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
Keys that apply to properties of files.
kCFURLFileSizeKey kCFURLFileAllocatedSizeKey kCFURLIsAliasFileKey
kCFURLFileSizeKeyKey for the file’s size in bytes, returned as a CFNumber object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLFileAllocatedSizeKeyKey for the total size allocated on disk for the file, returned as an CFNumber object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLIsAliasFileKeyKey for determining whether the file is an alias, returned as a CFBoolean object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
Keys that apply to volumes.
kCFURLVolumeLocalizedFormatDescriptionKey kCFURLVolumeTotalCapacityKey kCFURLVolumeAvailableCapacityKey kCFURLVolumeResourceCountKey kCFURLVolumeSupportsPersistentIDsKey kCFURLVolumeSupportsSymbolicLinksKey kCFURLVolumeSupportsHardLinksKey kCFURLVolumeSupportsJournalingKey kCFURLVolumeIsJournalingKey kCFURLVolumeSupportsSparseFilesKey kCFURLVolumeSupportsZeroRunsKey kCFURLVolumeSupportsCaseSensitiveNamesKey kCFURLVolumeSupportsCasePreservedNamesKey
kCFURLVolumeLocalizedFormatDescriptionKeyKey for the volume’s descriptive format name, returned as a CFString object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLVolumeTotalCapacityKeyKey for the volume’s capacity in bytes, returned as a CFNumber object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLVolumeAvailableCapacityKeyKey for the volume’s available capacity in bytes, returned as a CFNumber object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLVolumeResourceCountKeyKey for the total number of resources on the volume, returned as a CFNumber object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLVolumeSupportsPersistentIDsKeyKey for determining whether the volume supports persistent IDs, returned as a CFBoolean object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLVolumeSupportsSymbolicLinksKeyKey for determining whether the volume supports symbolic links, returned as a CFBoolean object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLVolumeSupportsHardLinksKeyKey for determining whether the volume supports hard links, returned as a CFBoolean object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLVolumeSupportsJournalingKeyKey for determining whether the volume supports journaling, returned as a CFBoolean object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLVolumeIsJournalingKeyKey for determining whether the volume is currently journaling, returned as a CFBoolean object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLVolumeSupportsSparseFilesKeyKey for determining whether the volume supports sparse files, returned as a CFBoolean object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLVolumeSupportsZeroRunsKeyKey for determining whether the volume supports zero runs, returned as a CFBoolean object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLVolumeSupportsCaseSensitiveNamesKeyKey for determining whether the volume supports case-sensitive names, returned as a CFBoolean object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
kCFURLVolumeSupportsCasePreservedNamesKeyKey for determining whether the volume supports case-preserved names, returned as a CFBoolean object.
Available in Mac OS X v10.6 and later.
Declared in CFURL.h.
The types of components in a URL.
typedef enum {
kCFURLComponentScheme = 1,
kCFURLComponentNetLocation = 2,
kCFURLComponentPath = 3,
kCFURLComponentResourceSpecifier = 4,
kCFURLComponentUser = 5,
kCFURLComponentPassword = 6,
kCFURLComponentUserInfo = 7,
kCFURLComponentHost = 8,
kCFURLComponentPort = 9,
kCFURLComponentParameterString = 10,
kCFURLComponentQuery = 11,
kCFURLComponentFragment = 12
} CFURLComponentType;
typedef enum CFURLPathStyle CFURLPathStyle;
kCFURLComponentSchemeThe URL’s scheme.
Available in Mac OS X v10.3 and later.
Declared in CFURL.h.
kCFURLComponentNetLocationThe URL’s network location.
Available in Mac OS X v10.3 and later.
Declared in CFURL.h.
kCFURLComponentPathThe URL’s path component.
Available in Mac OS X v10.3 and later.
Declared in CFURL.h.
kCFURLComponentResourceSpecifierThe URL’s resource specifier.
Available in Mac OS X v10.3 and later.
Declared in CFURL.h.
kCFURLComponentUserThe URL’s user.
Available in Mac OS X v10.3 and later.
Declared in CFURL.h.
kCFURLComponentPasswordThe user’s password.
Available in Mac OS X v10.3 and later.
Declared in CFURL.h.
kCFURLComponentUserInfoThe user’s information.
Available in Mac OS X v10.3 and later.
Declared in CFURL.h.
kCFURLComponentHostThe URL’s host.
Available in Mac OS X v10.3 and later.
Declared in CFURL.h.
kCFURLComponentPortThe URL’s port.
Available in Mac OS X v10.3 and later.
Declared in CFURL.h.
kCFURLComponentParameterStringThe URL’s parameter string.
Available in Mac OS X v10.3 and later.
Declared in CFURL.h.
kCFURLComponentQueryThe URL’s query.
Available in Mac OS X v10.3 and later.
Declared in CFURL.h.
kCFURLComponentFragmentThe URL’s fragment.
Available in Mac OS X v10.3 and later.
Declared in CFURL.h.
These constants are used by the CFURLGetByteRangeForComponent function.
Options you can use to determine how CFURL functions parse a file system path name.
enum CFURLPathStyle { kCFURLPOSIXPathStyle = 0, kCFURLHFSPathStyle = 1, kCFURLWindowsPathStyle = 2 }; typedef enum CFURLPathStyle CFURLPathStyle;
kCFURLPOSIXPathStyleIndicates a POSIX style path name. Components are slash delimited. A leading slash indicates an absolute path; a trailing slash is not significant.
Available in Mac OS X v10.0 and later.
Declared in CFURL.h.
kCFURLHFSPathStyleIndicates a HFS style path name. Components are colon delimited. A leading colon indicates a relative path, otherwise the first path component denotes the volume.
Available in Mac OS X v10.0 and later.
Declared in CFURL.h.
kCFURLWindowsPathStyleIndicates a Windows style path name.
Available in Mac OS X v10.0 and later.
Declared in CFURL.h.
© 2003, 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-08-07)