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 |
Append to the filter list with things from the predefined list
filters | mask of filters i.e. (filterAll | filterHTML) |
Add a filter
title | name of the filter |
filter | extensions to filter -- semicolon and space separated |
Show File Dialog. The dialog is displayed modally.
returnOK if the user selects OK, returnCancel if the user selects cancel |
Opens the file dialog asynchrounously.
The passed in object’s done method will be called upon completion.
The filename that should be suggested to the user as a default. This should
include the extension.
@throws NS_ERROR_FAILURE on attempts to get
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 filter which is currently selected in the File Picker dialog
@return Returns the index (0 based) of the selected filter in the filter list.
Set the directory that the file open/save dialog initially displays
@param displayDirectory the name of the directory
Get the nsIFile for the file or directory.
@return Returns the file currently selected
Get the nsIURI for the file or directory.
@return Returns the file currently selected
Get the enumerator for the selected files
only works in the modeOpenMultiple mode
@return Returns the files currently selected
Get the nsIDOMFile for the file.
@return Returns the file currently selected as File
Get the enumerator for the selected files
only works in the modeOpenMultiple mode
@return Returns the files currently selected as Files
Controls whether the chosen file(s) should be added to the system’s recent
documents list. This attribute will be ignored if the system has no “Recent
Docs” concept, or if the application is in private browsing mode (in which
case the file will not be added). Defaults to true.
The picker’s mode, as set by the ‘mode’ argument passed to init()
(one of the modeOpen et. al. constants specified above).