---
title: "CFURLCopyStrictPath(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfurlcopystrictpath(_:_:)"
---

# CFURLCopyStrictPath(_:_:)

Returns the path portion of a given URL.

## Declaration

```swift
func CFURLCopyStrictPath(_ anURL: CFURL!, _ isAbsolute: UnsafeMutablePointer<DarwinBoolean>!) -> CFString!
```

## Parameters

- `anURL`: The CFURL object to examine.
- `isAbsolute`: On return, indicates whether the path of anURL is absolute.

## Return Value

Return Value The path of anURL, or NULL if the URL cannot be decomposed (doesn’t conform to RFC 1808). Ownership follows the create rule. See The Create Rule.

## Discussion

Discussion 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 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.

## See Also

### Accessing the Parts of a URL

- [CFURLCanBeDecomposed(_:)](corefoundation/cfurlcanbedecomposed(_:).md)
- [CFURLCopyFileSystemPath(_:_:)](corefoundation/cfurlcopyfilesystempath(_:_:).md)
- [CFURLCopyFragment(_:_:)](corefoundation/cfurlcopyfragment(_:_:).md)
- [CFURLCopyHostName(_:)](corefoundation/cfurlcopyhostname(_:).md)
- [CFURLCopyLastPathComponent(_:)](corefoundation/cfurlcopylastpathcomponent(_:).md)
- [CFURLCopyNetLocation(_:)](corefoundation/cfurlcopynetlocation(_:).md)
- [CFURLCopyParameterString(_:_:)](corefoundation/cfurlcopyparameterstring(_:_:).md)
- [CFURLCopyPassword(_:)](corefoundation/cfurlcopypassword(_:).md)
- [CFURLCopyPath(_:)](corefoundation/cfurlcopypath(_:).md)
- [CFURLCopyPathExtension(_:)](corefoundation/cfurlcopypathextension(_:).md)
- [CFURLCopyQueryString(_:_:)](corefoundation/cfurlcopyquerystring(_:_:).md)
- [CFURLCopyResourceSpecifier(_:)](corefoundation/cfurlcopyresourcespecifier(_:).md)
- [CFURLCopyScheme(_:)](corefoundation/cfurlcopyscheme(_:).md)
- [CFURLCopyUserName(_:)](corefoundation/cfurlcopyusername(_:).md)
- [CFURLGetPortNumber(_:)](corefoundation/cfurlgetportnumber(_:).md)
