Returns the path portion of a given URL.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Foundation
CFURLobject to examine.
On return, indicates whether the path of
The path of
NULL if the URL cannot be decomposed (doesn't conform to RFC 1808). Ownership follows the create rule. See The Create Rule.
This function does not resolve the URL against its base, nor does it replace percent escape sequences. This function's return value does not include a leading slash and uses
is to report whether the URL's path is absolute. If this behavior is not appropriate, use the
CFURLCopy function whose return value includes the leading slash (giving the path the normal POSIX appearance). You may also want to use the
CFURLCopy 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
CFURLGet, which returns a C string.