nsIFilePicker
| IID: | 80faf095-c807-4558-a2cc-185ed70754ea |
| Inherits From: | nsISupports |
This interface is implemented by the following components:
Constants
Properties
AString defaultExtension
The extension that should be associated with files of the type we want to work with. On some platforms, this extension will be automatically appended to filenames the user enters, if needed.
AString defaultString
The filename that should be suggested to the user as a default.
nsILocalFile displayDirectory
Set the directory that the file open/save dialog initially displays
readonly nsILocalFile file
Get the nsILocalFile for the file or directory.
readonly nsISimpleEnumerator files
Get the enumerator for the selected files only works in the modeOpenMultiple mode
readonly nsIFileURL fileURL
Get the nsIFileURL for the file or directory.
PRInt32 filterIndex
The filter which is currently selected in the File Picker dialog
Methods
void appendFilter ( AString title , AString filter )
void appendFilters ( PRInt32 filterMask )
void init ( nsIDOMWindow parent , AString title , PRInt16 mode )
PRInt16 show ( )
void appendFilter ( AString title , AString filter )
Add a filter
- Arguments:
- title: name of the filter
- filter: extensions to filter -- semicolon and space separated
void appendFilters ( PRInt32 filterMask )
Append to the filter list with things from the predefined list
- Arguments:
- filterMask
void init ( nsIDOMWindow parent , AString title , PRInt16 mode )
Initialize the file picker widget. The file picker is not valid until this method is called.
- Arguments:
- parent: nsIDOMWindow parent. This dialog will be dependent on this parent. parent must be non-null.
- title: The title for the file widget
- mode: load, save, or get folder
Show File Dialog. The dialog is displayed modally.
- Returns:
- returnOK if the user selects OK, returnCancel if the user selects cancel
Reference documentation is generated from Mozilla's source.
