rust-magic icon indicating copy to clipboard operation
rust-magic copied to clipboard

Use `magic_file()` to read from stdin

Open robo9k opened this issue 11 years ago • 1 comments

When passing NULL as filename to magic_file() it will read from stdin instead. The crate should support that usage.

robo9k avatar Dec 22 '14 18:12 robo9k

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.

robo9k avatar Aug 11 '22 18:08 robo9k