<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: 10.0.0 - 10.4.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSDocument/revertToSavedFromURL:ofType:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSDocument(im)revertToSavedFromURL:ofType:"
  },
  "title" : "revertToSavedFromURL:ofType:"
}
-->

# revertToSavedFromURL:ofType:

Reverts the receiver.

```
- (BOOL) revertToSavedFromURL:(NSURL *) url ofType:(NSString *) type;
```

## Discussion

Reverts the receiver to the data stored at `aURL` of type `type`. Invokes [`readFromURL:ofType:`](/documentation/AppKit/NSDocument/readFromURL:ofType:) and returns whether that method successfully read the file and processed the document data.

---

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)