write method

  1. @override
Future<void> write(
  1. LicenseDocument license
)
override

Implementation

@override
Future<void> write(LicenseDocument license) async {
  try {
    ZipPackage? zipPackage = await ZipPackage.fromArchive(File(zip));
    if (zipPackage?.entries["META-INF/license.lcpl"] == null) {
      await ZipUtils.injectEntry(
          File(zip), ByteEntry(pathInZIP, license.data));
    }
  } on Exception {
    throw LcpException.container.writeFailed(pathInZIP);
  }
}