propfind method

Future<WebDavMultistatus> propfind(
  1. PathUri path, {
  2. WebDavPropWithoutValues? prop,
  3. WebDavDepth? depth,
})

Retrieves the props for the resource at path.

Optionally populates the given props on the returned resources. depth can be used to limit scope of the returned resources. See http://www.webdav.org/specs/rfc2518.html#METHOD_PROPFIND for more information.

Implementation

Future<WebDavMultistatus> propfind(
  PathUri path, {
  WebDavPropWithoutValues? prop,
  WebDavDepth? depth,
}) async =>
    _parseResponse(
      await _send(
        'PROPFIND',
        _constructUri(path),
        data: utf8.encode(
          WebDavPropfind(prop: prop ?? WebDavPropWithoutValues()).toXmlElement(namespaces: namespaces).toXmlString(),
        ),
        headers: depth != null ? {'Depth': depth.value} : null,
      ),
    );