public void FindFiles(string path, string[] pattern, bool subDirs, PictureFiles picFiles) { SearchOption useSubDirs = SearchOption.TopDirectoryOnly; // Find files if (subDirs) { useSubDirs = SearchOption.AllDirectories; } var files = Directory.GetFiles(path, "*", useSubDirs) .Where(file => pattern.Any(file.ToUpper().EndsWith)) .ToList(); // Add individual pictures foreach(string pic in files) { picFiles.Add(pic); } }
public void FindFiles(string path, string[] pattern, bool subDirs, PictureFiles picFiles) { SearchOption useSubDirs = SearchOption.TopDirectoryOnly; // Find files if (subDirs) { useSubDirs = SearchOption.AllDirectories; } var files = Directory.GetFiles(path, "*", useSubDirs) .Where(file => pattern.Any(file.ToUpper().EndsWith)) .ToList(); // Add individual pictures foreach (string pic in files) { picFiles.Add(pic); } }
public Statistics(PictureFiles files) { this.picFiles = files; }