TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

In C# how can you find the mime type of a file based on the file signature

2 pointsby v4usover 15 years ago

1 comment

mahmudover 15 years ago
All the more reasons I don't miss the function-lookup programming that is the Microsoft platform.<p>If tasked with this, my first reaction would be to look at the sources of the Unix `file` command, and find out a way to rip out the guts of its main function so to wrap it as a library. Then write an FFI for the one function and call it from $FAV_LANG. But only because I don't do shell pipes.