write method

Future<void> write(
  1. int offset,
  2. List<int> data
)

Writes the data to the file at the given offset.

Implementation

Future<void> write(
  int offset,
  List<int> data,
) async {
  final request = RequestFileWrite(
    file: handle,
    offset: offset,
    data: data,
  );
  final response = await client.invoke(request);
  switch (response) {
    case ResponseNone(): return;
    default: throw UnexpectedResponse();
  }
}