Debian Codegraph @

inst/scripts/mime-type.txt

raw
1 # get the MIME type using .NET's MimeMapping class
2
3 param (
4 [string]$filePath
5 )
6
7 Add-Type -AssemblyName "System.Web"
8 $mimeType = [System.Web.MimeMapping]::GetMimeMapping($filePath)
9 Write-Host $mimeType