public static bool IsSupportedFormat(string filename) { ArchiveFileType archiveFileType = MiniMagic.DetectFileType(filename); return(archiveFileType != ArchiveFileType.UNKNOWN); }
private static IEnumerable <FileEntry> ExtractFile(FileEntry fileEntry) { return(ExtractFile(fileEntry, MiniMagic.DetectFileType(fileEntry))); //return _files; }
public static ArchiveFileType DetectFileType(string filename) { using var memoryStream = new MemoryStream(File.ReadAllBytes(filename)); return(MiniMagic.DetectFileType(new FileEntry(filename, "", memoryStream))); }