proppatch method

Future<bool> proppatch(
  1. PathUri path, {
  2. WebDavProp? set,
  3. WebDavPropWithoutValues? remove,
})

Updates the props of the resource at path.

The props in set will be updated. The props in remove will be removed. Returns true if the update was successful. See:

Implementation

Future<bool> proppatch(
  PathUri path, {
  WebDavProp? set,
  WebDavPropWithoutValues? remove,
}) async {
  final request = proppatch_Request(
    path,
    set: set,
    remove: remove,
  );

  final response = await csrfClient.send(request);
  final data = await const WebDavResponseConverter().convert(response);
  for (final a in data.responses) {
    for (final b in a.propstats) {
      if (!b.status.contains('200')) {
        return false;
      }
    }
  }
  return true;
}