daskycodes / infer

Infer file and MIME type by checking the magic number signature

Home Page:https://hexdocs.pm/infer/readme.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid type spec for `Infer.get_from_path/1,2`

smaximov opened this issue · comments

The type specification states that the function returns either Infer.Type.t() or nil, but it returns {:error, :file.posix()} if given a non-existing path:

iex(1)> Infer.get_from_path("/path/to/non/existing/file.jpeg")
{:error, :enoent}