write method
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();
}
}