---
title: "CFURLCopyPassword(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfurlcopypassword(_:)"
---

# CFURLCopyPassword(_:)

Returns the password of a given URL.

## Declaration

```swift
func CFURLCopyPassword(_ anURL: CFURL!) -> CFString!
```

## Parameters

- `anURL`: The CFURL object to examine.

## Return Value

Return Value 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. See The Create Rule.

## 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)
- [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)
