save method

void save(
  1. File outputFile, {
  2. bool overwrite = false,
})

Saves the current fileBuffer to outputFile.

Implementation

void save(File outputFile, {bool overwrite = false}) {
  if (!overwrite && outputFile.existsSync()) {
    throw StateError("Can't overwrite output file: ${outputFile.path}");
  }

  var exeBytes = fileBuffer.toBytes();
  outputFile.writeAsBytesSync(exeBytes);
}