createFile method

Future<File> createFile(
  1. String path
)

Creates a new file at the given path in the repository.

Implementation

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