---
title: fileProtectionMask
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nsdata/writingoptions/fileprotectionmask
---

# fileProtectionMask

An option the system uses when determining the file protection options that the system assigns to the data.

## Declaration

```swift
static var fileProtectionMask: NSData.WritingOptions { get }
```

## See Also

### Constants

- [atomic](foundation/nsdata/writingoptions/atomic.md)
- [withoutOverwriting](foundation/nsdata/writingoptions/withoutoverwriting.md)
- [noFileProtection](foundation/nsdata/writingoptions/nofileprotection.md)
- [completeFileProtection](foundation/nsdata/writingoptions/completefileprotection.md)
- [completeFileProtectionUnlessOpen](foundation/nsdata/writingoptions/completefileprotectionunlessopen.md)
- [completeFileProtectionUntilFirstUserAuthentication](foundation/nsdata/writingoptions/completefileprotectionuntilfirstuserauthentication.md)
- [completeFileProtectionWhenUserInactive](foundation/nsdata/writingoptions/completefileprotectionwhenuserinactive.md)
