Flash Media Server |
|||
| Server-Side ActionScript Language Reference > Server-Side ActionScript Language Reference > File class > File.list() | |||
Flash Media Server 2.
fileObject.list(filter)
filter A Function object that determines the files in the returned array.
If the function returns true when a file's name is passed to it as a parameter, the file is added to the array returned by File.list(). This parameter is optional and allows you to filter the results of the call.
An Array object containing all the file objects in the directory.
Method; if the file is a directory, returns an array with an element for each file in the directory.
The following example returns files in the current directory that have three-character names:
var a = x.currentDir.list(function(name){return name.length==3;});