---
title: UIDocument.SaveOperation
framework: uikit
role: symbol
role_heading: Enumeration
path: uikit/uidocument/saveoperation
---

# UIDocument.SaveOperation

Constants that specify the type of save operation.

## Declaration

```swift
enum SaveOperation
```

## Overview

Overview You specify one of these constants as a parameter in the following methods: save(to:for:completionHandler:), writeContents(_:andAttributes:safelyTo:for:), writeContents(_:to:for:originalContentsURL:), fileAttributesToWrite(to:for:), fileNameExtension(forType:saveOperation:), changeCountToken(for:), and updateChangeCount(withToken:for:).

## Topics

### Constants

- [UIDocument.SaveOperation.forCreating](uikit/uidocument/saveoperation/forcreating.md)
- [UIDocument.SaveOperation.forOverwriting](uikit/uidocument/saveoperation/foroverwriting.md)

### Initializers

- [init(rawValue:)](uikit/uidocument/saveoperation/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Constants

- [UIDocument.ChangeKind](uikit/uidocument/changekind.md)
- [UIDocument.State](uikit/uidocument/state.md)
- [userActivityURLKey](uikit/uidocument/useractivityurlkey.md)
