writeFile method

Future<void> writeFile(
  1. String name,
  2. File file, {
  3. bool compress = true,
})

Writes the data contained in the specified file as a Zip archive entry name.

Compression can be disabled using the compress argument. This can be useful for data that is already compressed such as a JPEG image.

Throws a ZipException if the operation fails.

Implementation

Future<void> writeFile(String name, File file, {bool compress = true}) =>
    _manager
        .sendRequest<void>(_RequestType.writeFile, [name, file, compress]);