---
title: atomic
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/filewrapper/writingoptions/atomic
---

# atomic

Whether writing is done atomically.

## Declaration

```swift
static var atomic: FileWrapper.WritingOptions { get }
```

## Discussion

Discussion You can use this option to ensure that, when overwriting a file package, the overwriting either completely succeeds or completely fails, with no possibility of leaving the file package in an inconsistent state. Because this option causes additional I/O, you shouldn’t use it unnecessarily. For example, don’t use this option in an override of -[NSDocument write(to:ofType:)], because NSDocument safe-saving is already done atomically.

## See Also

### Constants

- [withNameUpdating](foundation/filewrapper/writingoptions/withnameupdating.md)
