CFindFiles:new
The new method constructs a new instance of a CFindFiles object. The CFindFiles class iterates over files in a folder, fetching the names of files matching a template. Three different constructor overloads are available to create a new CFindFiles and initialize the properties.
F = CFindFiles:new()
F = CFindFiles:new( sFolder )
F = CFindFiles:new( sFolder, sTemplate )
|
Three overloads are provided for this method. If you use the default constructor with no arguments, then the Open method must be called to set the folder where searching is to be done. If the folder and optional template are specified in the constructor, then the Open method need not be called before calling Next.
The following script fragment lists files inside the folder specified by the string sFolder:
|
-- Create a new CFindFiles object |
|
-- Iterate to the next file |
|
-- list the current path name |
|
|
|
-- finished with this object |