User Tools

Site Tools


built_in:list_folder

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

built_in:list_folder [2015/03/07 09:13]
octazid [Description]
built_in:list_folder [2016/05/08 15:36]
Line 1: Line 1:
-=====ListFolder===== 
  
-//(Information and examples taken from the DroidScript documentation)// 
- 
-====Description==== 
- 
-The **ListFolder** method lists all the files and sub folder names in a given path to a comma seperated list. 
- 
-The 'filter' parameter is an optional text parameter which allows you to specify a filter pattern. For example to find only mp3 files, you would specify ".mp3" as a filter 
- 
-Note: You can use the JavaScript 'split' function to convert the list to a JavaScript array if required. 
- 
-<code> list = app.ListFolder( path, filter, limit );</code> 
- 
----- 
- 
-====Example - Basic==== 
- 
-<code javascript> 
- 
-function OnStart() 
-{ 
-  list = app.ListFolder( "/sdcard" ); 
-  app.ShowPopup( list ); 
- 
- 
-</code> 
- 
-====Example - Filtered==== 
- 
-<code javascript> 
- 
-function OnStart() 
-{ 
-  list = app.ListFolder( "/sdcard", ".mp3" ); 
-  app.ShowPopup( list ); 
-} 
- 
-</code> 
built_in/list_folder.txt ยท Last modified: 2016/05/08 15:36 (external edit)