---
title: FileProtectionType
framework: foundation
role: symbol
role_heading: Structure
path: foundation/fileprotectiontype
---

# FileProtectionType

Protection level values that can be associated with a file attribute key.

## Declaration

```swift
struct FileProtectionType
```

## Overview

Overview These values are associated with the protectionKey key.

## Topics

### Creating a File Protection Type

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

### Working with Protection Levels

- [complete](foundation/fileprotectiontype/complete.md)
- [completeUnlessOpen](foundation/fileprotectiontype/completeunlessopen.md)
- [completeUntilFirstUserAuthentication](foundation/fileprotectiontype/completeuntilfirstuserauthentication.md)
- [none](foundation/fileprotectiontype/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)
- [URLFileProtection](foundation/urlfileprotection.md)
