File.TypeChecker
1.0.0
See the version list below for details.
dotnet add package File.TypeChecker --version 1.0.0
NuGet\Install-Package File.TypeChecker -Version 1.0.0
<PackageReference Include="File.TypeChecker" Version="1.0.0" />
paket add File.TypeChecker --version 1.0.0
#r "nuget: File.TypeChecker, 1.0.0"
// Install File.TypeChecker as a Cake Addin #addin nuget:?package=File.TypeChecker&version=1.0.0 // Install File.TypeChecker as a Cake Tool #tool nuget:?package=File.TypeChecker&version=1.0.0
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);
}
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages (9)
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 | 86,082 | 4/27/2024 |
4.1.0 | 113,220 | 4/6/2024 |
4.0.0 | 466,082 | 5/2/2023 |
3.0.0 | 508,330 | 12/16/2021 |
2.1.0 | 6,185 | 11/16/2021 |
2.0.3 | 1,407 | 11/11/2021 |
1.5.3 | 21,630 | 10/29/2021 |
1.5.2 | 25,842 | 8/2/2021 |
1.5.1 | 42,713 | 4/30/2021 |
1.4.0 | 61,425 | 11/24/2020 |
1.3.3 | 12,651 | 10/20/2020 |
1.3.2 | 5,465 | 10/4/2020 |
1.3.1 | 100,946 | 5/15/2020 |
1.3.0 | 8,651 | 5/7/2020 |
1.2.0 | 2,189 | 3/14/2020 |
1.1.0 | 1,455 | 3/7/2020 |
1.0.4 | 1,861 | 10/5/2019 |
1.0.3 | 1,632 | 10/5/2019 |
1.0.1 | 1,580 | 10/5/2019 |
1.0.0 | 8,648 | 10/4/2019 |