pub fn is_binary_file(path: &Path) -> Result<bool>
Detect whether a file at path is likely binary by sampling the first 8 KiB.
path
Returns std::io::Error when the file cannot be opened or read.
std::io::Error