Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> What are you going to do with that file you "identified" if not read it to get something out of it

Anything where there's a decision based on the file format but not its contents. This happens all the time.

* Telling the user what file type it is.

* Choosing a parser to load a file with.

* Restricting file types on upload forms.

* Identifying files for linters.

* Associating files with programs.

Ok some of those use file extensions because it's a lot easier and text based formats often don't have a magic number, but it's still a valid use case.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: