write method

Future<void> write(
  1. String path,
  2. List<int> bytes
)

Writes bytes to path under the served root.

Implementation

Future<void> write(String path, List<int> bytes) {
  final (payload, gz) = DriveCompression.encodePayload(path, bytes);
  return _call(
    DriveOp.write,
    fields: {'path': path, if (gz) kDriveGzipFlag: true},
    payload: payload,
  );
}