SecureDelete.FileSearch.FileSearcher.SearchFilesAsync C# (CSharp) Method

SearchFilesAsync() public method

Search files asynchronously
public SearchFilesAsync ( string folder, string pattern, bool regexPattern, bool includeSubfolders ) : void
folder string The folder where to begin searching.
pattern string The pattern the files need to match (ex. *.txt).
regexPattern bool
includeSubfolders bool Specifies whether or not to search the subfolders.
return void
        public void SearchFilesAsync(string folder, string pattern, bool regexPattern, bool includeSubfolders)
        {
            Thread t = new Thread(SearchAsync);
            t.Name = "SearchThread";

            ThreadParams param = new ThreadParams();
            param.folder = folder;
            param.pattern = pattern;
            param.regexPattern = regexPattern;
            param.includeSubfolders = includeSubfolders;

            t.Priority = ThreadPriority.BelowNormal;
            t.Start(param);
        }