enumNext Method

Top  Previous  Next

Gets the name of the next member of a folder.

Syntax

file.enumNext()

Return Value

A string with the name of the next file or folder. The empty string is returned when the end is reached.

Remarks

This method can only be applied to an instance File object enumerator returned by the enumStart function.

Example

// Make an array with all file names in a folder

var enum, name, list;

enum = File.enumStart("www", File.openFile);

list = Array(0);

for (;;)

{

   name = enum.enumNext();

   if (name.length == 0)

       break;

   list[list.length] = name;

}

enum.close();

// Array list[] has all the names

See Also

enumStart Function