public override CFFSourceAndConfidence GetConfidence(FileInfo aFile, CFFFileList aOtherFiles) { DExcDescriptor ret = new DExcDescriptor(aFile); // if (ret.Exists) { string extension = ret.Extension.ToLower(); // if (ret.IsTraceExtension) { ret.Level = int.MaxValue / 2; ret.OpType = CFFSource.TReaderOperationType.EReaderOpTypeTrace; } // If confidence indicates we can handle the file, then make a reader if (ret.OpType != CFFSource.TReaderOperationType.EReaderOpTypeNotSupported) { ret.Reader = new DExcReader(this, ret); // Remove any stack file if present string stackFile = ret.StackFileName; if (ret.StackFileExists) { aOtherFiles.Remove(stackFile); } } } // return(ret); }
public bool PrimeRecursive(DirectoryInfo aDirectory) { int successCount = 0; // Clear(); // CFFFileList otherFiles = new CFFFileList(aDirectory, SearchOption.AllDirectories); while (!otherFiles.IsEmpty) { FileInfo file = otherFiles.Dequeue(); // try { bool success = PrimeOne(file, otherFiles); if (success) { ++successCount; } } catch (Exception) { } } // Flush(); // return(successCount > 0); }
public bool Prime(FileInfo aFile) { Clear(); // CFFFileList otherFiles = new CFFFileList(); bool success = PrimeOne(aFile, otherFiles); Flush(); // return(success); }
private bool PrimeOne(FileInfo aFile, CFFFileList aOtherFiles) { bool success = false; // Check with the plugin loader to find all handlers CFFSourceAndConfidence[] handlers = PluginLoader.GetHandlers(aFile, aOtherFiles); if (handlers.Length > 0) { iWorkingSet.Add(handlers); success = true; } // return(success); }