writeSync static method
Writes the entire contents of a file.
Implementation
static Result<(), IoError> writeSync(Path path, Uint8List bytes) {
return Fs.ioGuardSync(() {
final file = File(path.asString());
file.writeAsBytesSync(bytes);
}).map((_) => ());
}