Table of Contents

Class MimeTypeUtils

Namespace
VpnHood.Net.Toolkit.Utils
Assembly
VpnHood.Net.Toolkit.dll

Helper class for determining MIME content types based on file extensions

public static class MimeTypeUtils
Inheritance
MimeTypeUtils
Inherited Members

Methods

GetContentType(string)

Gets the MIME content type for a given file path based on its extension

public static string GetContentType(string path)

Parameters

path string

The file path

Returns

string

The MIME content type, or "application/octet-stream" if unknown

GetSupportedExtensions()

Gets all supported extensions

public static IEnumerable<string> GetSupportedExtensions()

Returns

IEnumerable<string>

A collection of all supported file extensions

IsSupported(string)

Checks if the given extension is supported

public static bool IsSupported(string extension)

Parameters

extension string

The file extension (including the dot)

Returns

bool

True if the extension is supported, false otherwise