static void Main(string[] args) { if (args.Length == 0) { Usage(); return; } var fileName = args[0]; if (!File.Exists(fileName)) { Console.WriteLine("Error: Cannot find file - " + fileName); Console.WriteLine(); return; } var fingerprint = FileFormat.Get(fileName); if (fingerprint == null) { Console.WriteLine("Unknown format."); Console.WriteLine(); } else { WriteFingerprint(fingerprint); } }
public void OOXml_ExcelAddin_Is_Correct_Format() { using (var stream = GetFileFromZip("microsoft/ooxml/test.xlam")) { var fingerprint = FileFormat.Get(stream); Assert.True(fingerprint is ExcelAddinFormat); } }
public void ODF_FlatDocument_Returns_Not_Null() { using (var stream = GetFileFromZip("odf/test.fodt")) { var fingerprint = FileFormat.Get(stream); Assert.IsNotNull(fingerprint); } }
public void ODF_Database_Is_Correct_Format() { using (var stream = GetFileFromZip("odf/test.odb")) { var fingerprint = FileFormat.Get(stream); Assert.True(fingerprint is ODFDatabaseFormat); } }
public void ODF_PresentationTemplate_Returns_Not_Null() { using (var stream = GetFileFromZip("odf/test.otp")) { var fingerprint = FileFormat.Get(stream); Assert.IsNotNull(fingerprint); } }
public void ODF_Spreadsheet_Is_Correct_Format() { using (var stream = GetFileFromZip("odf/test.ods")) { var fingerprint = FileFormat.Get(stream); Assert.True(fingerprint is ODFSpreadsheetFormat); } }
public void Media_WebM_Returns_Not_Null() { using (var stream = GetFileFromZip("video/test.webm")) { var fingerprint = FileFormat.Get(stream); Assert.IsNotNull(fingerprint); } }
public void Media_Matroska_Audio_Returns_Not_Null() { using (var stream = GetFileFromZip("audio/test.mka")) { var fingerprint = FileFormat.Get(stream); Assert.IsNotNull(fingerprint); } }
public void OOXml_StencilWithMacros_Returns_Not_Null() { using (var stream = GetFileFromZip("microsoft/ooxml/test.vssm")) { var fingerprint = FileFormat.Get(stream); Assert.IsNotNull(fingerprint); } }
public void OOXml_DrawingTemplateWithMacros_Is_Correct_Format() { using (var stream = GetFileFromZip("microsoft/ooxml/test.vstm")) { var fingerprint = FileFormat.Get(stream); Assert.True(fingerprint is VisioDrawingTemplateFormat); } }
public void OOXml_DrawingTemplate_Returns_Not_Null() { using (var stream = GetFileFromZip("microsoft/ooxml/test.vstx")) { var fingerprint = FileFormat.Get(stream); Assert.IsNotNull(fingerprint); } }
public void OOXml_SlideshowWithMacros_Is_Correct_Format() { using (var stream = GetFileFromZip("microsoft/ooxml/test.ppsm")) { var fingerprint = FileFormat.Get(stream); Assert.True(fingerprint is PowerPointSlideshowFormat); } }
public void OOXml_Slideshow_Returns_Not_Null() { using (var stream = GetFileFromZip("microsoft/ooxml/test.ppsx")) { var fingerprint = FileFormat.Get(stream); Assert.IsNotNull(fingerprint); } }
public void OOXml_PresentationTemplateWithMacros_Is_Correct_Format() { using (var stream = GetFileFromZip("microsoft/ooxml/test.potm")) { var fingerprint = FileFormat.Get(stream); Assert.True(fingerprint is PowerPointPresentationTemplateFormat); } }
public void OOXml_PresentationTemplateWithMacros_Returns_Not_Null() { using (var stream = GetFileFromZip("microsoft/ooxml/test.potm")) { var fingerprint = FileFormat.Get(stream); Assert.IsNotNull(fingerprint); } }
public void Media_RealAudio_Is_Correct_Format() { using (var stream = GetFileFromZip("audio/test.ra")) { var fingerprint = FileFormat.Get(stream); Assert.True(fingerprint is RealAudioFormat); } }
public void Media_AMR_Is_Correct_Format() { using (var stream = GetFileFromZip("audio/test.amr")) { var fingerprint = FileFormat.Get(stream); Assert.True(fingerprint is AMRFormat); } }
public void OOXml_StenvilWithMacros_Is_Correct_Format() { using (var stream = GetFileFromZip("microsoft/ooxml/test.vssm")) { var fingerprint = FileFormat.Get(stream); Assert.True(fingerprint is VisioStencilFormat); } }
public void Media_Matroska_Audio_Is_Correct_Format() { using (var stream = GetFileFromZip("audio/test.mka")) { var fingerprint = FileFormat.Get(stream); Assert.True(fingerprint is MatroskaFormat); } }
public void OOXml_DocumentWithMacros_Is_Correct_Format() { using (var stream = GetFileFromZip("microsoft/ooxml/test.docm")) { var fingerprint = FileFormat.Get(stream); Assert.True(fingerprint is WordDocumentFormat); } }
public void Media_WebM_Is_Correct_Format() { using (var stream = GetFileFromZip("video/test.webm")) { var fingerprint = FileFormat.Get(stream); Assert.True(fingerprint is WebMFormat); } }
public void Media_3G2_Is_Correct_Format() { using (var stream = GetFileFromZip("video/test.3g2")) { var fingerprint = FileFormat.Get(stream); Assert.True(fingerprint is ThreeGP2Format); } }
public void ODF_Presentation_Is_Correct_Format() { using (var stream = GetFileFromZip("odf/test.odp")) { var fingerprint = FileFormat.Get(stream); Assert.True(fingerprint is ODFPresentationFormat); } }
public void Media_QuickTime_Is_Correct_Format() { using (var stream = GetFileFromZip("video/test.mov")) { var fingerprint = FileFormat.Get(stream); Assert.True(fingerprint is QuickTimeFormat); } }
public void ODF_Database_Returns_Not_Null() { using (var stream = GetFileFromZip("odf/test.odb")) { var fingerprint = FileFormat.Get(stream); Assert.IsNotNull(fingerprint); } }
public void Media_Ogg_Video_Is_Correct_Format() { using (var stream = GetFileFromZip("video/test.ogv")) { var fingerprint = FileFormat.Get(stream); Assert.True(fingerprint is OggFormat); } }
public void ODF_DocumentTemplate_Is_Correct_Format() { using (var stream = GetFileFromZip("odf/test.ott")) { var fingerprint = FileFormat.Get(stream); Assert.True(fingerprint is ODFDocumentTemplateFormat); } }
public void Media_ASF_Video_Is_Correct_Format() { using (var stream = GetFileFromZip("video/test.wmv")) { var fingerprint = FileFormat.Get(stream); Assert.True(fingerprint is AdvancedSystemsFormat); } }
public void ODF_FlatDocument_Is_Correct_Format() { using (var stream = GetFileFromZip("odf/test.fodt")) { var fingerprint = FileFormat.Get(stream); Assert.True(fingerprint is ODFFlatDocumentFormat); } }
public void Media_Dolby_AC3_Audio_Is_Correct_Format() { using (var stream = GetFileFromZip("audio/test.ac3")) { var fingerprint = FileFormat.Get(stream); Assert.True(fingerprint is AC3Format); } }