<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSSaveOptions",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@E@NSSaveOptions"
  },
  "title" : "NSSaveOptions"
}
-->

# NSSaveOptions

The [`saveOptions`](/documentation/Foundation/NSCloseCommand/saveOptions) method returns one of the following constants to indicate how to deal with saving any modified documents:

```
enum NSSaveOptions
```

## Topics

### Constants

[`NSSaveOptionsYes`](/documentation/Foundation/NSSaveOptions/yes)

Indicates a modified document should be saved on closing without asking the user.

[`NSSaveOptionsNo`](/documentation/Foundation/NSSaveOptions/no)

Indicates a modified document should not be saved on closing.

[`NSSaveOptionsAsk`](/documentation/Foundation/NSSaveOptions/ask)

Indicates the user should be asked before saving any modified documents on closing. When no option is specified, this is the default.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`Sendable`](/documentation/Swift/Sendable)

[`Hashable`](/documentation/Swift/Hashable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)