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.