@mozilla.org/filepicker;1

This component implements the following interfaces:

Constants

PRInt16 nsIFilePicker.modeOpen = 0
PRInt16 nsIFilePicker.modeSave = 1
PRInt16 nsIFilePicker.modeGetFolder = 2
PRInt16 nsIFilePicker.modeOpenMultiple = 3
PRInt16 nsIFilePicker.returnOK = 0
PRInt16 nsIFilePicker.returnCancel = 1
PRInt16 nsIFilePicker.returnReplace = 2
PRInt32 nsIFilePicker.filterAll = 1
PRInt32 nsIFilePicker.filterHTML = 2
PRInt32 nsIFilePicker.filterText = 4
PRInt32 nsIFilePicker.filterImages = 8
PRInt32 nsIFilePicker.filterXML = 16
PRInt32 nsIFilePicker.filterXUL = 32
PRInt32 nsIFilePicker.filterApps = 64

Properties

AString nsIFilePicker.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 nsIFilePicker.defaultString

The filename that should be suggested to the user as a default.

nsILocalFile nsIFilePicker.displayDirectory

Set the directory that the file open/save dialog initially displays

readonly nsILocalFile nsIFilePicker.file

Get the nsILocalFile for the file or directory.

readonly nsISimpleEnumerator nsIFilePicker.files

Get the enumerator for the selected files only works in the modeOpenMultiple mode

readonly nsIFileURL nsIFilePicker.fileURL

Get the nsIFileURL for the file or directory.

PRInt32 nsIFilePicker.filterIndex

The filter which is currently selected in the File Picker dialog

Methods

InterfaceMethod
nsIFilePicker void appendFilter ( AString title , AString filter )
nsIFilePicker void appendFilters ( PRInt32 filterMask )
nsIFilePicker void init ( nsIDOMWindow parent , AString title , PRInt16 mode )
nsIFilePicker PRInt16 show ( )

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com