CFindFiles:Close
The Close method closes file searching for the CFindFiles object and frees memory. It does not delete the current CFindFiles object.
CFindFiles:Close() |
Call this method to terminate searching in a folder. If you plan to call Open more than once for this CFindFiles object, then Close must be called before Open can begin a new file search.
The following script fragment lists files inside the folder specified by the string sFolder and the filename template "h*.fts"
F = CFindFiles:new() |
-- Create a new CFindFiles object |
F:Open( sFolder, "h*.fts" ) |
-- specify thefolder and template |
while F:Next() do |
-- Iterate to the next file |
Printf("%s\r\n", F:GetPath() ) |
-- list the current path name |
end |
|
F:Close() |
-- finished with this object |