FilePickerOptions

The FilePickerOptions object contains options that are passed into blackberry.invoke.card.invokeFilePicker().


Supported Platform(s)

- BlackBerry 10
View Supported Platform Table
APIBB5.0BB6.0BB7.0PB1.0PB2.0BB10Ripple
allowOverwrite           Y 
defaultSaveFileNames           Y 
defaultType           Y 
directory           Y 
filter           Y 
imageCrop           Y 
mode           Y 
sortBy           Y 
sortOrder           Y 
title           Y 
type           Y 
viewMode           Y 

Configuration Document Settings

To use all of the API described for this object, you must ensure the following settings are in your configuration document:

This API does not require a <feature> element to be declared in the configuration document of your BlackBerry WebWorks Application.

Permission Elements (PlayBook and BlackBerry 10+)
This API does not require a <permission> element to be declared in the configuration document of your BlackBerry WebWorks Application.

Properties

Boolean allowOverwrite
String[] defaultSaveFileNames
String defaultType
String[] directory
String[] filter
Boolean imageCrop
String mode
String sortBy
String sortOrder
String title
String[] type
String viewMode

Properties

Boolean allowOverwrite


A true or false that describes whether the file being saved can be overwritten or not. Defaults to false. It is only valid in FILEPICKER_MODE_SAVER and FILEPICKER_MODE_SAVER_MULTIPLE.


Supported Platforms
 - BlackBerry 10

String[] defaultSaveFileNames


An array of strings that describes the FileName of the FilePicker when its invoked in Saver mode. options.mode should either be FILEPICKER_MODE_SAVER or FILEPICKER_MODE_SAVER_MULTIPLE. Defaults to no file name. In FILEPICKER_MODE_SAVER mode it will only use the first item in this array and display the filename to the user. In FILEPICKER_MODE_SAVER_MULTIPLE it will only allow the user to select a folder and in the onDone call it will return the folder path appending with the fileNames.


Supported Platforms
 - BlackBerry 10

String defaultType


A string that describes the default type selected in the FilePicker dropdown. Defaults to the first type in the array of option.type. Only takes affect if more than one options.type is selected. Availabe types can be found under properties.


Supported Platforms
 - BlackBerry 10

String[] directory


An array of strings describes the folders that will presented to the FilePicker. Defaults to the last folder that the picker was opened in. Recommended to be specified with every call to control the user experience.


Supported Platforms
 - BlackBerry 10

String[] filter


An array of strings that the file picker files should be filtered on. example [".jpg",".bmp"]. Defaults to no filter.


Supported Platforms
 - BlackBerry 10

Boolean imageCrop


A true or false to describe the imageCrop. Defaults to false. It will only be allowed for pictures of format jpg, jpe, jpeg or png in mode FILEPICKER_MODE_PICKER and FILEPICKER_MODE_PICKER_MULTIPLE.


Supported Platforms
 - BlackBerry 10

String mode


A string that describes the mode of the FilePicker. Availabe modes can be found under properties.


Supported Platforms
 - BlackBerry 10

String sortBy


A string describes the FilePicker's sort by name or date or suffix or size. Availabe sort by fields can be found under properties.


Supported Platforms
 - BlackBerry 10

String sortOrder


A string describes the viewer sort order of the FilePicker, such as ascending or descending or default layout. Defaults to default sort order. Availabe modes can be found under properties.


Supported Platforms
 - BlackBerry 10

String title


A string that describes the title of the FilePicker. Defaults to the folder name.


Supported Platforms
 - BlackBerry 10

String[] type


An array of strings that describes the type of files that the FilePicker will show. Defaults to showing all types. Availabe types can be found under properties.


Supported Platforms
 - BlackBerry 10

String viewMode


A string describes the viewer mode of the FilePicker, such as grid or list layout. Availabe view modes can be found under properties.


Supported Platforms
 - BlackBerry 10

Documentation generated by JsDoc Toolkit 2.4.0 on Sun Dec 30 2012 18:15:37 GMT-0500 (EST)