private List <string> SearchPathsContaining(string pathSnippet) { List <string> foundFiles = new List <string>(); foreach (string TppFile in TppFileList) { if (TppFile.Contains(pathSnippet)) { foundFiles.Add(TppFile); } } return(foundFiles); }
private string FindCondensedDir(string fileName) { foreach (string TppFile in TppFileList) { if (TppFile.EndsWith(fileName)) { if (TppFile.Contains("_pftxs")) { int pftxsPathLength = TppFile.IndexOf("_pftxs") + 6; return(Path.GetDirectoryName(TppFile.Remove(0, pftxsPathLength + 1))); } else { return(Path.GetDirectoryName(TppFile)); } } } return(null); }