<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFURLCopyStrictPath(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFURLCopyStrictPath"
  },
  "title" : "CFURLCopyStrictPath(_:_:)"
}
-->

# CFURLCopyStrictPath(_:_:)

Returns the path portion of a given URL.

```
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

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](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/20001148-103029).

## 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(_:)`](/documentation/CoreFoundation/CFURLCopyPath(_:)) function whose return value includes the leading slash (giving the path the normal POSIX appearance). You may also want to use the [`CFURLCopyFileSystemPath(_:_:)`](/documentation/CoreFoundation/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(_:_:_:_:)`](/documentation/CoreFoundation/CFURLGetFileSystemRepresentation(_:_:_:_:)), which returns a C string.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)