removeDirectory method

Future<void> removeDirectory(
  1. String path,
  2. bool recursive
)

Removes the directory at the given path from the repository. If recursive is true it removes also the contents, otherwise the directory must be empty.

Implementation

Future<void> removeDirectory(
  String path,
  bool recursive,
) async {
  final request = RequestRepositoryRemoveDirectory(
    repo: handle,
    path: path,
    recursive: recursive,
  );
  final response = await client.invoke(request);
  switch (response) {
    case ResponseNone(): return;
    default: throw UnexpectedResponse();
  }
}