11 configuration options · available in Rust, Java, Python, Node.js, Ruby, Go
use opendal::Operator;
let operator = Operator::via_iter("webdav", [
])?;
use opendal::Operator;
let operator = 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()),
// Enable conditional read support.
//
// When enabled (the default), OpenDAL forwards the RFC 7232 headers
// `If-Match`, `If-None-Match`, `If-Modified-Since` and
// `If-Unmodified-Since` to the server when callers provide them.
//
// Some WebDAV-compatible servers (e.g., nginx-dav) don't return ETags
// in PROPFIND or don't honor these headers on GET. Setting this to
// `false` drops the four `read_with_if_*` capabilities, so calls like
// `reader_with(path).if_match(...)` return `ErrorKind::Unsupported`
// locally instead of being silently ignored by the server.
//
// Default: true
// ("enable_conditional_read".to_string(), "true".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 |
enable_conditional_read | bool | no | Enable conditional read support.
When enabled (the default), OpenDAL forwards the RFC 7232 headers
If-Match, If-None-Match, If-Modified-Since and
If-Unmodified-Since to the server when callers provide them.
Some WebDAV-compatible servers (e.g., nginx-dav) don't return ETags
in PROPFIND or don't honor these headers on GET. Setting this to
false drops the four read_with_if_* capabilities, so calls like
reader_with(path).if_match(...) return ErrorKind::Unsupported
locally instead of being silently ignored by the server.
Default: true |