This interface is implemented by the following components:
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.
The filename that should be suggested to the user as a default.
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.
The filter which is currently selected in the File Picker dialog
Add a filter
- title: name of the filter
- filter: extensions to filter -- semicolon and space separated
Append to the filter list with things from the predefined list
void init ( nsIDOMWindow parent , AString title , PRInt16 mode )
Initialize the file picker widget. The file picker is not valid until this method is called.
- 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.
- returnOK if the user selects OK, returnCancel if the user selects cancel
Reference documentation is generated from Mozilla's source.