Skip to main content

is_text

Function is_text 

Source
pub fn is_text(abs: &Path) -> bool
Expand description

Is the file text? The first SNIFF_BYTES carry no NUL byte, which is the judgement version control makes too; encoding is the reader’s concern, so a Latin-1 file passes here and is refused by name where it is read. An unreadable file is not text.