JavaScript
{dialog.object}phoneGapListFilesRecurseURL Method
Syntax
{dialog.object}.phoneGapListFilesRecurseURL(dirpath,onSuccess,onError);
Arguments
- dirpath
The URL of the directory containing the files. The directory name must end in a forward slash '/'.
- onSuccess
A javascript function that is called when a list of files is successfully retrieved. It takes one parameter, filelist, an array of strings representing each file found in the hierarchy of directories. Directory names end in a forward slash.
- onError
A javascript function called if an error occurs.
Description
List files in a directory and in the sub-directories of the specified directory.
Example
var _onSuccess = function(filelist) { alert("Files found!"); }; var onError = function(e) { alert("An error occured!"); }; var baseURI = {dialog.object}.phoneGapGetLocalDirURL('private'); var dirName = 'mydir'; var dirpath = baseURI + dirName; {dialog.object}.phoneGapListFilesRecurseURL(dirpath, onSuccess, onError);