/// <summary> /// Fills DocumentInfo list from passed directories /// </summary> /// <param name="dirs">Array of directories pathes</param> public static void FillFromDirectories(string[] dirs) { foreach (var dir in dirs) { if (!Directory.Exists(dir)) { continue; } int i = 1; // Very simple document ID var files = Directory.GetFiles(dir, "*.pdf"); foreach (var file in files) { FileInfo fi = new FileInfo(file); var docInfo = new PDFFile(fi.Name, i, fi.FullName, (int)fi.Length); _PDFFilesInfo.Add(docInfo); i++; } } }