Screenshots
Example Usage
using (var fileStream = File.OpenRead("suspicious-file.exe"))
{
// Check if file type can be identified
if (FileTypeValidator.IsTypeRecognizable(fileStream))
{
// Get the actual file type
IFileType fileType = FileTypeValidator.GetFileType(fileStream);
Console.WriteLine($"File type: {fileType.Name} ({fileType.Extension})");
// Check specific type
bool isImage = fileStream.IsImage();
bool isPdf = fileStream.Is<PortableDocumentFormat>();
}
}