Instance Method

setRequiredFileType:

Specifies the file type (as an extension) or a UTI.

Declaration

- (void)setRequiredFileType:(NSString *)type;

Parameters

type

String to set as the extension to be appended to any selected files that don’t already have that extension.

Discussion

If type is an extension, it should not include the period that begins the extension. Pass nil to indicate any type. File type strings encoding HFS file types are not valid values for this attribute. You need to invoke this method each time the Save panel is used for another file type within the application.

This method is equivalent to using allowedFileTypes with an array containing only type (unless type is nil, and then it’s equivalent to setting the property to nil).

See Also

Configuring Panel Content

extensionHidden

A Boolean value that indicates whether the extension-hiding checkbox is visible and checked.

- requiredFileType

Returns the required file type (if any).

Deprecated
directoryURL

The directory shown in the panel as a URL.

- setDirectory:

Sets the current pathname in the panel’s browser.

Deprecated
canSelectHiddenExtension

A Boolean value that indicates whether the panel allows the user to hide or show file extensions.

allowedFileTypes

An array of NSString objects specifying the allowed file types for the panel.

allowsOtherFileTypes

A Boolean value that indicates whether the panel allows the user to save files with an extension that’s not in the list of allowed types.

treatsFilePackagesAsDirectories

A Boolean value that indicates whether the panel displays file packages as directories.