File.TypeChecker 1.0.0

There is a newer version of this package available.
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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="File.TypeChecker" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="File.TypeChecker" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="File.TypeChecker" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add File.TypeChecker --version 1.0.0
                    
#r "nuget: File.TypeChecker, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=File.TypeChecker&version=1.0.0
                    
Install File.TypeChecker as a Cake Addin
#tool nuget:?package=File.TypeChecker&version=1.0.0
                    
Install File.TypeChecker as a Cake Tool

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);
}
There are no supported framework assets in this package.

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.

SAPI

Simple API server written in C#

File.TypeChecker.Async

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.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
4.1.1 389,005 4/27/2024
4.1.0 278,380 4/6/2024
4.0.0 687,534 5/2/2023
3.0.0 579,753 12/16/2021
2.1.0 6,295 11/16/2021
2.0.3 1,468 11/11/2021
1.5.3 23,491 10/29/2021
1.5.2 30,361 8/2/2021
1.5.1 45,396 4/30/2021
1.4.0 63,707 11/24/2020
1.3.3 17,830 10/20/2020
1.3.2 5,529 10/4/2020
1.3.1 115,814 5/15/2020
1.3.0 8,845 5/7/2020
1.2.0 2,242 3/14/2020
1.1.0 1,531 3/7/2020
1.0.4 1,973 10/5/2019
1.0.3 1,714 10/5/2019
1.0.1 1,671 10/5/2019
1.0.0 10,762 10/4/2019