fitzgen / is_executable

Is there an executable file at the given path?
Apache License 2.0
19 stars 9 forks source link

Makes the crate work on Windows as well. #1

Closed bcmyers closed 5 years ago

bcmyers commented 5 years ago

I had to solve this problem - identifying if a file is executable or not - in another crate I was working on and my solution needed to work with Windows. I discovered that one can use the GetBinaryTypeW function from the Windows API to accomplish this. Figured you might be interested in including this solution for Windows in your crate as well.

evilpie commented 5 years ago

I don't think this can really work on Windows. A python file might be executable, but not a windows binary. SHGetFileInfo at least claims to support batch files.