rust-magic
rust-magic copied to clipboard
Use `magic_file()` to read from stdin
When passing NULL as filename to magic_file() it will read from stdin instead.
The crate should support that usage.
https://blog.rust-lang.org/2022/08/11/Rust-1.63.0.html#rust-ownership-for-raw-file-descriptorshandles-io-safety might be of interest for working with other, explicit file descriptors.