---
title: "CFURLCopyFileSystemPath(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfurlcopyfilesystempath(_:_:)"
---

# CFURLCopyFileSystemPath(_:_:)

Returns the path portion of a given URL.

## Declaration

```swift
func CFURLCopyFileSystemPath(_ anURL: CFURL!, _ pathStyle: CFURLPathStyle) -> CFString!
```

## Parameters

- `anURL`: The CFURL object whose path you want to obtain.
- `pathStyle`: The operating system path style to be used to create the path. See doc://com.apple.corefoundation/documentation/CoreFoundation/CFURLPathStyle for a list of possible values.

## Return Value

Return Value The URL’s path in the format specified by pathStyle. Ownership follows the create rule. See The Create Rule.

## Discussion

Discussion This function returns the URL’s path as a file system path for a given path style.

## See Also

### Accessing the Parts of a URL

- [CFURLCanBeDecomposed(_:)](corefoundation/cfurlcanbedecomposed(_:).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)
- [CFURLCopyStrictPath(_:_:)](corefoundation/cfurlcopystrictpath(_:_:).md)
- [CFURLCopyUserName(_:)](corefoundation/cfurlcopyusername(_:).md)
- [CFURLGetPortNumber(_:)](corefoundation/cfurlgetportnumber(_:).md)
