openFile method

Future<File> openFile(
  1. String path
)

Opens an existing file at the given path in the repository.

Implementation

Future<File> openFile(
  String path,
) async {
  final request = RequestRepositoryOpenFile(
    repo: handle,
    path: path,
  );
  final response = await client.invoke(request);
  switch (response) {
    case ResponseFile(value: final value): return File(client, value);
    default: throw UnexpectedResponse();
  }
}