10 configuration options · available in Rust, Python, Node.js, Java
use opendal::Operator;
let op = Operator::via_iter("webdav", [
])?;
use opendal::Operator;
let op = Operator::via_iter("webdav", [
// endpoint of this backend
// ("endpoint".to_string(), "...".to_string()),
// username of this backend
// ("username".to_string(), "...".to_string()),
// password of this backend
// ("password".to_string(), "...".to_string()),
// token of this backend
// ("token".to_string(), "...".to_string()),
// root of this backend
// ("root".to_string(), "...".to_string()),
// Disable automatic parent directory creation before write operations.
//
// By default, OpenDAL creates parent directories using MKCOL before writing files.
// This requires PROPFIND support to check directory existence.
//
// Some WebDAV-compatible servers (e.g., bazel-remote) don't support PROPFIND
// or don't require explicit directory creation. Enable this option to skip
// the MKCOL calls and write files directly.
//
// Default: false
// ("disable_create_dir".to_string(), "true".to_string()),
// The XML namespace prefix for user metadata properties.
//
// This prefix is used in PROPPATCH/PROPFIND XML requests.
// Different servers may require different prefixes.
//
// Default: "opendal"
// ("user_metadata_prefix".to_string(), "...".to_string()),
// The XML namespace URI for user metadata properties.
//
// This URI uniquely identifies the namespace for custom properties.
// Different servers may require different namespace URIs.
// For example, Nextcloud might work better with its own namespace.
//
// Default: `https://opendal.apache.org/ns`
// ("user_metadata_uri".to_string(), "...".to_string()),
])?;
Every option is passed as a string key; OpenDAL parses it into the right type. Some services may require building the binding with the matching services-* feature enabled.
| Key | Type | Required | Description |
|---|---|---|---|
endpoint | string | no | endpoint of this backend |
username | string | no | username of this backend |
password | string | no | password of this backend |
token | string | no | token of this backend |
root | string | no | root of this backend |
disable_copydeprecated | bool | no | Deprecated: WebDAV copy capability is enabled by default. Deprecated since 0.57.0: WebDAV copy capability is enabled by default and this option is no longer needed. |
disable_create_dir | bool | no | Disable automatic parent directory creation before write operations. By default, OpenDAL creates parent directories using MKCOL before writing files. This requires PROPFIND support to check directory existence. Some WebDAV-compatible servers (e.g., bazel-remote) don't support PROPFIND or don't require explicit directory creation. Enable this option to skip the MKCOL calls and write files directly. Default: false |
enable_user_metadatadeprecated | bool | no | Deprecated: WebDAV user metadata capability is enabled by default. Deprecated since 0.57.0: WebDAV user metadata capability is enabled by default. Use CapabilityOverrideLayer to override write_with_user_metadata for endpoints without PROPPATCH support. |
user_metadata_prefix | string | no | The XML namespace prefix for user metadata properties. This prefix is used in PROPPATCH/PROPFIND XML requests. Different servers may require different prefixes. Default: "opendal" |
user_metadata_uri | string | no | The XML namespace URI for user metadata properties.
This URI uniquely identifies the namespace for custom properties.
Different servers may require different namespace URIs.
For example, Nextcloud might work better with its own namespace.
Default: https://opendal.apache.org/ns |