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

# requiredFileType

Returns the required file type (if any).

```
- (NSString *) requiredFileType;
```

## Return Value

The required file type (if any).

## Discussion

A file specified in the Save panel is saved with the designated filename and this file type as an extension. Examples of common file types are “rtf”, “tiff”, and “ps”. File type strings encoding HFS file types are not valid values for this attribute. An `nil` return value indicates that the user can save to any ASCII file.

This method is equivalent to using [`allowedFileTypes`](/documentation/AppKit/NSSavePanel/allowedFileTypes) and returning the first element of the list of allowed types, or `nil` if there are none.

---

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)