In a dart console application, how can I tell if a file is binary (non-text)?
Read the file content and check if you find non-displayable characters. An example would be \u0000 or consecutive \u0000, which often occurs in binary files but not in text files.
See also How can I determine if a file is binary or text in c#?, https://stackoverflow.com/a/277568/217408
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With