Skip to main content

working_file_is_binary

Function working_file_is_binary 

Source
pub fn working_file_is_binary(repo_path: &Path, rel_path: &str) -> bool
Expand description

Whether a working-tree file looks binary — a NUL byte in the first 8 KiB (git’s heuristic). Reads only that prefix, so a large binary isn’t slurped in full just to be classified. Absent or unreadable ⇒ false.