listAvailableCertificatesFromFileSystem( sFolder, sFileExtension ) method

Certificate

Syntax

listAvailableCertificatesFromFileSystem( sFolder, sFileExtension ) → {String[]}

Parameters

Name Type Description
sFolder String Folder in which to search for files.This should be a full absolute path, based on the root of the device file system. The separator may be either "/" or "\". For example, "\sdcard\mycerts" or "/sdcard/mycerts" is acceptable. Do not include any http prefixes, such as "file:".
sFileExtension String File extension to which the list should be restricted.Pass the string expected after the "." in the file name. For example, to match *.p12, pass "p12" as the argument. Pass null to return all files in the folder.

Returns

A list of Strings, each String being the full path name of a matched file in the given folder.

Type:

String[]

Example

// The following script gets an array of file paths for files on
// the sdcard with the extension p12
var certStore = CertificateStore.getDefault();
var certPaths = certStore.listAvailableCertificatesFromFileSystem("/sdcard/", "p12");

Source

Certificate.js, line 254.