---
title: withoutOverwriting
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nsdata/writingoptions/withoutoverwriting
---

# withoutOverwriting

An option that attempts to write data to a file and fails with an error if the destination file already exists.

## Declaration

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

## Discussion

Discussion You can’t combine this constant with atomic because atomic allows the system to overwrite the original file.

## See Also

### Constants

- [atomic](foundation/nsdata/writingoptions/atomic.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)
- [fileProtectionMask](foundation/nsdata/writingoptions/fileprotectionmask.md)
- [completeFileProtectionWhenUserInactive](foundation/nsdata/writingoptions/completefileprotectionwhenuserinactive.md)
