/// <summary> /// The recursive files. /// </summary> /// <param name="path"> /// The path. /// </param> /// <returns> /// </returns> private static List <DiscUtilFile> RecursiveFiles(DiscDirectoryInfo path) { var returnFiles = new List <DiscUtilFile>(); foreach (DiscFileInfo file in path.GetFiles()) { var newFile = new DiscUtilFile(); newFile.FileName = file.FullName; newFile.FileSize = file.Length; returnFiles.Add(newFile); } return(returnFiles); }
/// <summary> /// The find file. /// </summary> /// <param name="text"> /// The text. /// </param> /// <returns> /// The find file. /// </returns> public int FindFile(string text) { int value = -1; for (int index = 0; index < this.Files.Count; index++) { DiscUtilFile file = this.Files[index]; if (file.FileName.ToLower().Contains(text.ToLower())) { value = index; break; } } return(value); }