isBinaryFile function

bool isBinaryFile(
  1. String path
)

Returns true if file's content is binary else false

Implementation

bool isBinaryFile(String path) {
  path = pathExpand(path);
  final f = dart_io.File(path);
  Uint8List bytes = f.readAsBytesSync();
  return isBinary(bytes);
}