---
title: resourceSpecifier
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsurl/resourcespecifier
---

# resourceSpecifier

The resource specifier. (read-only)

## Declaration

```swift
var resourceSpecifier: String? { get }
```

## Discussion

Discussion This property contains the resource specifier. Any percent-encoded characters are not unescaped. For example, in the URL http://www.example.com/index.html?key1=value1#jumplink, the resource specifier is //www.example.com/index.html?key1=value1#jumplink (everything after the colon). important: If the receiver does not specify a net location portion of the URL, as returned by the toll-free bridged CFURL function CFURLCopyNetLocation(_:), then this method returns only the path of the receiver. For example, in the URL file:///file.txt, the resource specifier is /file.txt.

## See Also

### Accessing the Parts of the URL

- [absoluteString](foundation/nsurl/absolutestring.md)
- [absoluteURL](foundation/nsurl/absoluteurl.md)
- [baseURL](foundation/nsurl/baseurl.md)
- [fileSystemRepresentation](foundation/nsurl/filesystemrepresentation.md)
- [fragment](foundation/nsurl/fragment.md)
- [host](foundation/nsurl/host.md)
- [lastPathComponent](foundation/nsurl/lastpathcomponent.md)
- [parameterString](foundation/nsurl/parameterstring.md)
- [password](foundation/nsurl/password.md)
- [path](foundation/nsurl/path.md)
- [pathComponents](foundation/nsurl/pathcomponents.md)
- [pathExtension](foundation/nsurl/pathextension.md)
- [port](foundation/nsurl/port.md)
- [query](foundation/nsurl/query.md)
- [relativePath](foundation/nsurl/relativepath.md)
