Vector<String> FindFiles(String path, String mask = "*", bool subfolders = true); Vector<String> FindFolders(String path, String mask);
void FindFiles(String path, Callback1<String> found, String mask = "*", bool subfolders = true);
void FindFiles(String path, Callback1<String> found, String mask, bool subfolders) { FindFile ff (path + "/*"); if(ff) do { path = ff.GetPath(); if(ff.IsFolder() && subfolders) { FindFiles(path, found, mask, subfolders); } else if(ff.IsFile() && PatternMatch(mask, path)) { found(path); } }while (ff.Next()); } Vector<String> FindFiles(String path, String mask, bool subfolders) { Vector<String> ret; FindFile ff (path + "/*"); if(ff) do { path = ff.GetPath(); if(ff.IsFolder() && subfolders) { Vector<String> tmp = FindFiles(path, mask, true); ret.Append(tmp) ; } else if(ff.IsFile() && PatternMatch(mask, path)) { ret.Add() = path; } }while (ff.Next()); return ret; } Vector<String> FindFolders(String path, String mask) { Vector<String> ret; FindFile ff (path + "/*"); if(ff) do { path = ff.GetPath(); if(ff.IsFolder() && PatternMatch(mask, path)) { ret.Add() = path; } }while (ff.Next()); return ret; }