File.TypeChecker
1.0.4
See the version list below for details.
dotnet add package File.TypeChecker --version 1.0.4
NuGet\Install-Package File.TypeChecker -Version 1.0.4
<PackageReference Include="File.TypeChecker" Version="1.0.4" />
paket add File.TypeChecker --version 1.0.4
#r "nuget: File.TypeChecker, 1.0.4"
// Install File.TypeChecker as a Cake Addin #addin nuget:?package=File.TypeChecker&version=1.0.4 // Install File.TypeChecker as a Cake Tool #tool nuget:?package=File.TypeChecker&version=1.0.4
FileTypeChecker is a easy to use library that allows you to read file and recognize its type. This will help you to validate all files that is provided by external sources.
How it works?
FileTypeChecker use file's "magic numbers" to identifying its type. See more about Magic Numbers
How to use?
using (var fileStream = File.OpenRead("myFileLocation"))
{
var isRecognizableType = FileTypeValidator.IsTypeRecognizable(fileStream);
if (!isRecognizableType)
{
// Do something ...
}
IFileType fileType = FileTypeValidator.GetFileType(fileStream);
Console.WriteLine("Type Name: {0}", fileType.Name);
Console.WriteLine("Type Extension: {0}", fileType.Extension);
}
What types of file are supported?
Currently FileTypeChecker recognizes following file types:
- JPEG
- Bitmap
- Portable Network Graphic
- Graphics Interchange Format 87a
- Graphics Interchange Format 89a
- Tagged Image File Format
- Portable Document Format
- Microsoft Office Document
- eXtensible Markup Language
- RAR archive version 1.50
- RAR archive version 5.00
- Photoshop Document file
- ZIP file
- eXtensible ARchive format
- TAR Archive
- 7-Zip File Format
- GZIP compressed file
- DOS MZ executable
- Executable and Linkable Format
- Audio Video Interleave video format
- MPEG-1 Layer 3 file
- MP3 file with an ID3v2 container
- ISO9660 CD/DVD image file
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
This package has no dependencies.
NuGet packages (10)
Showing the top 5 NuGet packages that depend on File.TypeChecker:
Package | Downloads |
---|---|
Mii.Rinjani.Gateway.Commons
Package Description |
|
DeploySoftware.LaunchPad.Core
Shared code for LaunchPad framework. |
|
File.TypeChecker.Web
Don't let users to inject you an invalid file! FileTypeChecker is a easy to use library that allows you to read file and recognize its type. This will help you to validate all files that is provided by external sources. |
|
Deploy.LaunchPad.Core
Shared code for LaunchPad framework. |
|
SAPI
Simple API server written in C# |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
4.1.1 | 129,107 | 4/27/2024 |
4.1.0 | 150,323 | 4/6/2024 |
4.0.0 | 506,720 | 5/2/2023 |
3.0.0 | 520,506 | 12/16/2021 |
2.1.0 | 6,238 | 11/16/2021 |
2.0.3 | 1,421 | 11/11/2021 |
1.5.3 | 22,066 | 10/29/2021 |
1.5.2 | 26,611 | 8/2/2021 |
1.5.1 | 43,240 | 4/30/2021 |
1.4.0 | 62,047 | 11/24/2020 |
1.3.3 | 13,592 | 10/20/2020 |
1.3.2 | 5,476 | 10/4/2020 |
1.3.1 | 104,533 | 5/15/2020 |
1.3.0 | 8,664 | 5/7/2020 |
1.2.0 | 2,194 | 3/14/2020 |
1.1.0 | 1,464 | 3/7/2020 |
1.0.4 | 1,865 | 10/5/2019 |
1.0.3 | 1,634 | 10/5/2019 |
1.0.1 | 1,582 | 10/5/2019 |
1.0.0 | 9,615 | 10/4/2019 |