h2non / filetype

Fast, dependency-free Go package to infer binary file types based on the magic numbers header signature
https://pkg.go.dev/github.com/h2non/filetype?tab=doc
MIT License
2.1k stars 175 forks source link

directory not recognized #115

Closed xlango closed 2 years ago

h2non commented 2 years ago

Not intended to recognize directories. You can simply check before calling the library whether a given path is a proper file or not.