Skip to main content

Crate nextcloud_dav

Crate nextcloud_dav 

Source
Expand description

WebDAV client foundation for the Nextcloud SDK.

The crate covers the part of WebDAV Nextcloud’s file API leans on first: addressing a path below a user’s file tree (DavPath), describing what to ask for (DavProperty, PropfindBody), and turning a 207 Multi-Status answer into typed resources (DavResource) through DavClient.

Requests travel through nextcloud_sdk_core’s transport seam, so this crate is generic over how bytes move and how credentials are applied; it never opens a socket itself.

XML is written and read by hand. The propfind body is small and fixed, and the reader only has to understand a multistatus envelope, so a full XML implementation would be more weight than value. xml documents the escaping helpers and the limits of that reader.

Modules§

xml
Hand-written XML support for the small subset WebDAV needs.

Structs§

DavClient
WebDAV client generic over the transport and the credential source.
DavPath
Where a resource lives in Nextcloud’s WebDAV tree.
DavResource
One entry of a multistatus answer.
PropfindBody
A PROPFIND request body asking for a set of properties.

Enums§

DavNamespace
XML namespace a WebDAV property is defined in.
DavProperty
A property a propfind request may ask for.
Depth
How far a PROPFIND reaches below the addressed resource (RFC 4918 §9.1).
Overwrite
Behaviour when the destination resource already exists (RFC 4918 §10.6).

Constants§

DEPTH_HEADER
Header carrying a WebDAV Depth value.
DESTINATION_HEADER
Header carrying a WebDAV destination URI (RFC 4918 §10.3).
OVERWRITE_HEADER
Header specifying whether to overwrite a destination resource (RFC 4918 §10.6).