CFindFiles:Start
The Start method re-initializes the file name iteration after files were already iterated. You can then use the Next method to retrieve each file name. As an alternative to iteration using Start and Next, you can use the GetTable method to return the names of all file names in a Lua table.
CFindFiles:Start() |
This method re-initializes the file name iteration after files have been found and after the names have been iterated. Normally, iteration is ready for the Next method after the Open method is called. See the Next method for more information.
The following script makes a second pass through the file name list by re-starting the iteration using the Start method:
|
-- Create a new CFindFiles object |
|
-- specify thefolder and template |
|
-- Iterate through the file names |
|
-- list each path name |
|
|
-- do something with the file names |
|
|
-- Re-initialize the iteration |
|
-- Iterate through the files again |
|
-- list the current path name |
|
|
|
|
|
-- finished with this object |