Skip to content Namespace

FileList namespace represents the list of file objects.

FileList Properties:Name Description
length: [type: Number, ReadOnly] Returns the number of files in the FileList object.

The FileList library comprises of the following API.


The namespace contains the following functions.


The item API returns the File object at the specified index in the FileList.


Input Parameters

Parameter Description
Index Index in the FileList.


var mainLoc =;
var newDirLoc = mainLoc + constants.FILE_PATH_SEPARATOR + "myDirItem";

var myNewDir = new;
var myFile1Loc = mainLoc + constants.FILE_PATH_SEPARATOR + "myDirItem" + constants.FILE_PATH_SEPARATOR + "myFileItem1.txt";

var myFile1 = new;
var myFile2Loc = mainLoc + constants.FILE_PATH_SEPARATOR + "myDirItem" + constants.FILE_PATH_SEPARATOR + "myFileItem2.txt";

var myFile2 = new;
var myFileTemp = new;

var filesListTemp = myFileTemp.getFilesList(); //getFilesList using getFilesList API
alert(filesListTemp.length); //File list length must be greater than 0.
var myFile = filesListTemp.item(1); //Provide index of file 

Return Values

Return Value Description
File File object at specified index. Null if there is no File at specified index or if index is not in FileList range.



Platform Availability

Available for iOS, Android, and Windows platforms.