public override List<string> GetChildFiles(string file, FileTaskType taskType) { List<string> list = new List<string>(); if (ProTONEConfig.UseLinkedFiles) { string fileType = PathUtils.GetExtension(file).ToUpperInvariant(); string[] childFileTypes = ProTONEConfig.GetChildFileTypes(fileType); if (childFileTypes != null && childFileTypes.Length > 0) { foreach (string childFileType in childFileTypes) { // This will find files like "FileName.PFT" and change them into "FileName.CFT" string childFilePath = Path.ChangeExtension(file, childFileType); if (File.Exists(childFilePath) && !list.Contains(childFilePath)) { list.Add(childFilePath); } // This will find files like "FileName.PFT" and change them into "FileName.PFT.CFT" // (i.e. handle double type extension case like for Bookmark files) string childFileType2 = string.Format("{0}.{1}", PathUtils.GetExtension(file), childFileType); string childFilePath2 = Path.ChangeExtension(file, childFileType2); if (File.Exists(childFilePath2) && !list.Contains(childFilePath2)) { list.Add(childFilePath2); } } } } return list; }