---
title: URLFileProtection
framework: foundation
role: symbol
role_heading: Structure
path: foundation/urlfileprotection
---

# URLFileProtection

Protection-level values for a URL resource key.

## Declaration

```swift
struct URLFileProtection
```

## Overview

Overview These are values for the URLResourceKey key fileProtectionKey.

## Topics

### Creating a URL File Protection Type

- [init(rawValue:)](foundation/urlfileprotection/init(rawvalue:).md)

### Protection levels

- [complete](foundation/urlfileprotection/complete.md)
- [completeUnlessOpen](foundation/urlfileprotection/completeunlessopen.md)
- [completeUntilFirstUserAuthentication](foundation/urlfileprotection/completeuntilfirstuserauthentication.md)
- [completeWhenUserInactive](foundation/urlfileprotection/completewhenuserinactive.md)
- [none](foundation/urlfileprotection/none.md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Supporting Types

- [FileManager.DirectoryEnumerationOptions](foundation/filemanager/directoryenumerationoptions.md)
- [FileManager.SearchPathDirectory](foundation/filemanager/searchpathdirectory.md)
- [FileManager.SearchPathDomainMask](foundation/filemanager/searchpathdomainmask.md)
- [FileAttributeKey](foundation/fileattributekey.md)
- [FileAttributeType](foundation/fileattributetype.md)
- [FileProtectionType](foundation/fileprotectiontype.md)
