Skip to main content

is_binary_file

Function is_binary_file 

Source
pub fn is_binary_file(path: &Path) -> Result<bool>
Expand description

Detect whether a file at path is likely binary by sampling the first 8 KiB.

ยงErrors

Returns std::io::Error when the file cannot be opened or read.