---
title: atomicWrite
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nsdata/writingoptions/atomicwrite
---

# atomicWrite

An option that attempts to write data to an auxiliary file first and then exchange the files.

## Declaration

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