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

Both sides previous revision Previous revision
Next revision
Previous revision
built_in:list_folder [2015/03/07 09:13]
octazid [Description]
built_in:list_folder [2016/05/08 15:36] (current)
Line 9: Line 9:
 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 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.+Note: ListFolder returns a JavaScript array.
  
-<code> list = app.ListFolder( path, filter, limit );</code>+<code> list = app.ListFolder( path, filter, limit, options );</code>
  
 ---- ----
Line 21: Line 21:
 function OnStart() function OnStart()
 { {
-  list = app.ListFolder( "/sdcard" );+  list = app.ListFolder( "/sdcard/" );
   app.ShowPopup( list );   app.ShowPopup( list );
  
Line 38: Line 38:
  
 </code> </code>
 +
 +====Example - Limited====
 +
 +<code javascript>
 +
 +function OnStart()
 +{
 +  //Find first ten mp4 files on internal sdcard.      
 +  mp4List = app.ListFolder( "/sdcard", ".mp4", 10 ); 
 +  app.ShowPopup( mp4List );
 +}
 +
 +</code>
 +
 +
 +----
 +====Options====
 +| alphasort  | sort a list of folders in alphabetical order     |
 +| FullPath   | returns a list with the Fullpath of the content  |
built_in/list_folder.1425719635.txt.gz · Last modified: 2015/03/07 17:13 (external edit)