Skip to main content

is_binary_file

Function is_binary_file 

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

Check if a file is binary by reading the first 8 KiB and checking for null bytes. Returns true if binary, false if text, or an error if the file cannot be read.