[cs631apue] how to check the file extension

Jan Schaumann jschauma at stevens.edu
Tue Nov 8 16:06:53 EST 2016


bzhang41 <bzhang41 at stevens.edu> wrote:
 
> Last class I asked you about how to check the file extension for the 
> "Content-Type" header, and you suggested a library function which will 
> return the file extension.

The best way to get the file type would be using libmagic(3).  See e.g.
http://vivithemage.co.uk/blog/?p=105

-Jan


More information about the cs631apue mailing list