This is an automated email from the ASF dual-hosted git repository.
Xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git
The following commit(s) were added to refs/heads/main by this push:
new e46a9ac615 fix(services/webdav): respect disable_create_dir in copy
and rename (#8838)
e46a9ac615 is described below
commit e46a9ac615fd9fdf67d20db4a4b69fb16ff11c6b
Author: Xuanwo <[email protected]>
AuthorDate: Mon Nov 23 15:42:02 2026 +0800
fix(services/webdav): respect disable_create_dir in copy and rename (#8838)
* fix(core): parse multipart boundary Content-Type parameters
The previous parser split on the literal `boundary=` and returned
everything after it. Valid RFC 9110 parameter forms such as quoted boundaries,
trailing parameters, case-insensitive names, and whitespace around separators
were parsed incorrectly.
Parse the Content-Type parameter list while respecting quoted values, match
the boundary parameter name case-insensitively, and reject empty or malformed
values.
* fix(core): honor quoted-pair and trailing garbage in multipart boundary
`parse_multipart_boundary` stopped a quoted parameter value at the first
`"` and ignored anything between the closing quote and the next `;`. A
preceding parameter such as `note="a\"b;boundary=fake"` therefore yielded
`fake"` instead of the real boundary, `boundary="foo\"bar"` silently
truncated to `foo\`, and `boundary="abc"garbage` was accepted.
Scan quoted values linearly with `char_indices` so `\"` and `\\` do not
terminate the string, reject boundaries whose value uses a quoted-pair
(RFC 2046 `bchars` disallows `\`, and `&str` cannot unescape it), and
require only optional whitespace after a closing quote. Malformed
non-boundary parameters are skipped so parsing still advances.
* fix(services/webdav): respect disable_create_dir in copy and rename
* chore: regenerate bindings and docs for webdav disable_create_dir
---
.../OpenDAL/ServiceConfig/WebdavServiceConfig.cs | 2 +-
.../java/org/apache/opendal/ServiceConfig.java | 14 +-
bindings/python/python/opendal/config.py | 2 +-
core/Cargo.lock | 1 +
core/services/webdav/Cargo.toml | 1 +
core/services/webdav/src/backend.rs | 226 ++++++++++++++++++++-
core/services/webdav/src/config.rs | 14 +-
core/services/webdav/src/core.rs | 8 +-
website/data/services.json | 14 +-
9 files changed, 248 insertions(+), 34 deletions(-)
diff --git a/bindings/dotnet/OpenDAL/ServiceConfig/WebdavServiceConfig.cs
b/bindings/dotnet/OpenDAL/ServiceConfig/WebdavServiceConfig.cs
index 9d87125118..b255b4d2b3 100644
--- a/bindings/dotnet/OpenDAL/ServiceConfig/WebdavServiceConfig.cs
+++ b/bindings/dotnet/OpenDAL/ServiceConfig/WebdavServiceConfig.cs
@@ -34,7 +34,7 @@ namespace OpenDAL.ServiceConfig
[System.Obsolete("WebDAV copy capability is enabled by default and
this option is no longer needed.")]
public bool? DisableCopy { get; init; }
/// <summary>
- /// 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 automatic parent directory creation before write, copy,
and rename operations. By default, OpenDAL creates missing parent directories
using `PROPFIND` and `MKCOL` before writing, copying, or renaming files. Enable
this option to skip those automatic parent directory checks and `MKCOL` calls
for servers that do not support `PROPFIND` or do not require explicit parent
collections (for example, `bazel-remote`). Explicit `create_dir` calls are
unaffected. Default: `false`
/// </summary>
public bool? DisableCreateDir { get; init; }
/// <summary>
diff --git a/bindings/java/src/main/java/org/apache/opendal/ServiceConfig.java
b/bindings/java/src/main/java/org/apache/opendal/ServiceConfig.java
index a706844865..5a17f08638 100644
--- a/bindings/java/src/main/java/org/apache/opendal/ServiceConfig.java
+++ b/bindings/java/src/main/java/org/apache/opendal/ServiceConfig.java
@@ -4146,13 +4146,13 @@ public interface ServiceConfig {
*/
public final Boolean disableCopy;
/**
- * <p>Disable automatic parent directory creation before write
operations.</p>
- * <p>By default, OpenDAL creates parent directories using MKCOL
before writing files.
- * This requires PROPFIND support to check directory existence.</p>
- * <p>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.</p>
- * <p>Default: false</p>
+ * <p>Disable automatic parent directory creation before write, copy,
and rename operations.</p>
+ * <p>By default, OpenDAL creates missing parent directories using
<code>PROPFIND</code> and <code>MKCOL</code>
+ * before writing, copying, or renaming files. Enable this option to
skip those automatic
+ * parent directory checks and <code>MKCOL</code> calls for servers
that do not support <code>PROPFIND</code>
+ * or do not require explicit parent collections (for example,
<code>bazel-remote</code>).</p>
+ * <p>Explicit <code>create_dir</code> calls are unaffected.</p>
+ * <p>Default: <code>false</code></p>
*/
public final Boolean disableCreateDir;
/**
diff --git a/bindings/python/python/opendal/config.py
b/bindings/python/python/opendal/config.py
index 87539de89c..d0e816466e 100644
--- a/bindings/python/python/opendal/config.py
+++ b/bindings/python/python/opendal/config.py
@@ -1006,7 +1006,7 @@ class WebdavConfig(TypedDict):
disable_copy: NotRequired[bool]
"""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: NotRequired[bool]
- """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 automatic parent directory creation before write, copy, and
rename operations. By default, OpenDAL creates missing parent directories
using `PROPFIND` and `MKCOL` before writing, copying, or renaming files. Enable
this option to skip those automatic parent directory checks and `MKCOL` calls
for servers that do not support `PROPFIND` or do not require explicit parent
collections (for example, `bazel-remote`). Explicit `create_dir` calls are
unaffected. Default: `false`"""
disable_depth_infinity: NotRequired[bool]
"""Disable native recursive listing with WebDAV's `Depth: infinity`. Set
this to `true` for servers that reject or ignore infinity depth. With
capability simulation enabled, OpenDAL walks the directory tree using `Depth:
1` requests instead. The default is `false`."""
enable_conditional_read: NotRequired[bool]
diff --git a/core/Cargo.lock b/core/Cargo.lock
index f04e35a2d4..aedf957c21 100644
--- a/core/Cargo.lock
+++ b/core/Cargo.lock
@@ -8846,6 +8846,7 @@ version = "0.59.5"
dependencies = [
"anyhow",
"bytes",
+ "futures",
"http 1.5.0",
"log",
"opendal-core",
diff --git a/core/services/webdav/Cargo.toml b/core/services/webdav/Cargo.toml
index ec54d2a5ea..832e6eb9e1 100644
--- a/core/services/webdav/Cargo.toml
+++ b/core/services/webdav/Cargo.toml
@@ -41,4 +41,5 @@ quick-xml = { workspace = true, features = ["serialize",
"overlapped-lists"] }
serde = { workspace = true, features = ["derive"] }
[dev-dependencies]
+futures = { workspace = true }
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/core/services/webdav/src/backend.rs
b/core/services/webdav/src/backend.rs
index b40caff47e..2d23de7562 100644
--- a/core/services/webdav/src/backend.rs
+++ b/core/services/webdav/src/backend.rs
@@ -104,16 +104,16 @@ impl WebdavBuilder {
self
}
- /// Disable automatic parent directory creation before write operations.
+ /// Disable automatic parent directory creation before write, copy, and
rename operations.
///
- /// By default, OpenDAL creates parent directories using MKCOL before
writing files.
- /// This requires PROPFIND support to check directory existence.
+ /// By default, OpenDAL creates missing parent directories using
`PROPFIND` and `MKCOL`
+ /// before writing, copying, or renaming files. Enable this option to skip
those automatic
+ /// parent directory checks and `MKCOL` calls for servers that do not
support `PROPFIND`
+ /// or do not require explicit parent collections (for example,
`bazel-remote`).
///
- /// 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.
+ /// Explicit `create_dir` calls are unaffected.
///
- /// Default: false
+ /// Default: `false`
pub fn disable_create_dir(mut self, disable: bool) -> Self {
self.config.disable_create_dir = disable;
self
@@ -414,7 +414,9 @@ impl Service for WebdavBackend {
args: OpRename,
) -> Result<RpRename> {
self.core.webdav_stat(ctx, from).await?;
- self.core.webdav_mkcol(ctx, get_parent(to)).await?;
+ if !self.core.disable_create_dir {
+ self.core.webdav_mkcol(ctx, get_parent(to)).await?;
+ }
let resp = self
.core
.webdav_move(ctx, from, to, args.if_not_exists())
@@ -447,8 +449,103 @@ impl Service for WebdavBackend {
#[cfg(test)]
mod tests {
+ use std::sync::Mutex;
+
+ use bytes::Bytes;
+ use futures::stream;
+ use http::Request;
+ use http::Response;
+
use super::*;
+ const FILE_STAT_RESPONSE: &str = r#"<?xml version="1.0" encoding="utf-8"?>
+<D:multistatus xmlns:D="DAV:">
+ <D:response>
+ <D:href>/src.txt</D:href>
+ <D:propstat>
+ <D:prop>
+ <D:getcontentlength>5</D:getcontentlength>
+ <D:getlastmodified>Sat, 07 May 2022 05:52:22 GMT</D:getlastmodified>
+ <D:resourcetype/>
+ </D:prop>
+ <D:status>HTTP/1.1 200 OK</D:status>
+ </D:propstat>
+ </D:response>
+</D:multistatus>"#;
+
+ #[derive(Clone, Debug, PartialEq, Eq)]
+ struct RecordedRequest {
+ method: String,
+ path: String,
+ destination: Option<String>,
+ }
+
+ #[derive(Clone, Default)]
+ struct RecordingHttpTransport {
+ requests: Arc<Mutex<Vec<RecordedRequest>>>,
+ }
+
+ impl RecordingHttpTransport {
+ fn requests(&self) -> Vec<RecordedRequest> {
+ self.requests.lock().unwrap().clone()
+ }
+
+ fn methods_and_paths(&self) -> Vec<(String, String)> {
+ self.requests()
+ .into_iter()
+ .map(|req| (req.method, req.path))
+ .collect()
+ }
+ }
+
+ impl HttpTransport for RecordingHttpTransport {
+ async fn fetch(&self, req: Request<Buffer>) ->
Result<Response<HttpBody>> {
+ let method = req.method().as_str().to_string();
+ let path = req.uri().path().to_string();
+ let destination = req
+ .headers()
+ .get("Destination")
+ .and_then(|v| v.to_str().ok())
+ .map(str::to_owned);
+
+ self.requests.lock().unwrap().push(RecordedRequest {
+ method: method.clone(),
+ path: path.clone(),
+ destination,
+ });
+
+ let (status, body) = match (method.as_str(), path.as_str()) {
+ ("PROPFIND", "/src.txt") => (StatusCode::MULTI_STATUS,
FILE_STAT_RESPONSE),
+ ("PROPFIND", _) => (StatusCode::NOT_FOUND, ""),
+ ("MKCOL", _) | ("COPY", _) | ("MOVE", _) | ("PUT", _) =>
(StatusCode::CREATED, ""),
+ _ => (StatusCode::METHOD_NOT_ALLOWED, ""),
+ };
+
+ let data = Bytes::from_static(body.as_bytes());
+ let size = data.len() as u64;
+ Ok(Response::builder()
+ .status(status)
+ .body(HttpBody::new(
+ stream::iter([Ok(Buffer::from(data))]),
+ Some(size),
+ ))
+ .unwrap())
+ }
+ }
+
+ fn test_operator(disable_create_dir: bool) -> Result<(Operator,
RecordingHttpTransport)> {
+ let transport = RecordingHttpTransport::default();
+ let op = Operator::new(
+ WebdavBuilder::default()
+ .endpoint("http://localhost:8080")
+ .disable_create_dir(disable_create_dir),
+ )?
+ .with_context(
+
OperationContext::new().with_http_transport(HttpTransporter::new(transport.clone())),
+ );
+ Ok((op, transport))
+ }
+
#[test]
fn depth_infinity_is_enabled_by_default() -> Result<()> {
let service = WebdavBuilder::default()
@@ -490,4 +587,117 @@ mod tests {
assert!(service.list(&ctx, "/", OpList::default()).is_ok());
Ok(())
}
+
+ #[tokio::test]
+ async fn copy_creates_parent_dirs_by_default() -> Result<()> {
+ let (op, transport) = test_operator(false)?;
+
+ op.copy("src.txt", "nested/dir/dst.txt").await?;
+
+ assert_eq!(
+ transport.methods_and_paths(),
+ vec![
+ ("PROPFIND".to_string(), "/src.txt".to_string()),
+ ("PROPFIND".to_string(), "/nested/dir/".to_string()),
+ ("PROPFIND".to_string(), "/nested/".to_string()),
+ ("MKCOL".to_string(), "/nested/".to_string()),
+ ("MKCOL".to_string(), "/nested/dir/".to_string()),
+ ("COPY".to_string(), "/src.txt".to_string()),
+ ]
+ );
+ assert_eq!(
+ transport.requests().last().unwrap().destination.as_deref(),
+ Some("http://localhost:8080/nested/dir/dst.txt")
+ );
+ Ok(())
+ }
+
+ #[tokio::test]
+ async fn copy_skips_parent_dir_creation_when_disabled() -> Result<()> {
+ let (op, transport) = test_operator(true)?;
+
+ op.copy("src.txt", "nested/dir/dst.txt").await?;
+
+ assert_eq!(
+ transport.methods_and_paths(),
+ vec![
+ ("PROPFIND".to_string(), "/src.txt".to_string()),
+ ("COPY".to_string(), "/src.txt".to_string()),
+ ]
+ );
+ assert_eq!(
+ transport.requests().last().unwrap().destination.as_deref(),
+ Some("http://localhost:8080/nested/dir/dst.txt")
+ );
+ Ok(())
+ }
+
+ #[tokio::test]
+ async fn rename_creates_parent_dirs_by_default() -> Result<()> {
+ let (op, transport) = test_operator(false)?;
+
+ op.rename("src.txt", "nested/dir/dst.txt").await?;
+
+ assert_eq!(
+ transport.methods_and_paths(),
+ vec![
+ ("PROPFIND".to_string(), "/src.txt".to_string()),
+ ("PROPFIND".to_string(), "/nested/dir/".to_string()),
+ ("PROPFIND".to_string(), "/nested/".to_string()),
+ ("MKCOL".to_string(), "/nested/".to_string()),
+ ("MKCOL".to_string(), "/nested/dir/".to_string()),
+ ("MOVE".to_string(), "/src.txt".to_string()),
+ ]
+ );
+ assert_eq!(
+ transport.requests().last().unwrap().destination.as_deref(),
+ Some("http://localhost:8080/nested/dir/dst.txt")
+ );
+ Ok(())
+ }
+
+ #[tokio::test]
+ async fn rename_skips_parent_dir_creation_when_disabled() -> Result<()> {
+ let (op, transport) = test_operator(true)?;
+
+ op.rename("src.txt", "nested/dir/dst.txt").await?;
+
+ assert_eq!(
+ transport.methods_and_paths(),
+ vec![
+ ("PROPFIND".to_string(), "/src.txt".to_string()),
+ ("MOVE".to_string(), "/src.txt".to_string()),
+ ]
+ );
+ assert_eq!(
+ transport.requests().last().unwrap().destination.as_deref(),
+ Some("http://localhost:8080/nested/dir/dst.txt")
+ );
+ Ok(())
+ }
+
+ #[tokio::test]
+ async fn write_and_explicit_create_dir_respect_disable_create_dir() ->
Result<()> {
+ let (op, transport) = test_operator(true)?;
+ assert!(op.info().capability().create_dir);
+
+ op.write("nested/dir/dst.txt", "hello").await?;
+ assert_eq!(
+ transport.methods_and_paths(),
+ vec![("PUT".to_string(), "/nested/dir/dst.txt".to_string())]
+ );
+
+ op.create_dir("nested/dir/").await?;
+ assert_eq!(
+ transport.methods_and_paths(),
+ vec![
+ ("PUT".to_string(), "/nested/dir/dst.txt".to_string()),
+ ("PROPFIND".to_string(), "/nested/dir/".to_string()),
+ ("PROPFIND".to_string(), "/nested/".to_string()),
+ ("MKCOL".to_string(), "/nested/".to_string()),
+ ("MKCOL".to_string(), "/nested/dir/".to_string()),
+ ]
+ );
+ Ok(())
+ }
}
diff --git a/core/services/webdav/src/config.rs
b/core/services/webdav/src/config.rs
index c1f0c76b5e..6f50ac6ed9 100644
--- a/core/services/webdav/src/config.rs
+++ b/core/services/webdav/src/config.rs
@@ -43,16 +43,16 @@ pub struct WebdavConfig {
note = "WebDAV copy capability is enabled by default and this option
is no longer needed."
)]
pub disable_copy: bool,
- /// Disable automatic parent directory creation before write operations.
+ /// Disable automatic parent directory creation before write, copy, and
rename operations.
///
- /// By default, OpenDAL creates parent directories using MKCOL before
writing files.
- /// This requires PROPFIND support to check directory existence.
+ /// By default, OpenDAL creates missing parent directories using
`PROPFIND` and `MKCOL`
+ /// before writing, copying, or renaming files. Enable this option to skip
those automatic
+ /// parent directory checks and `MKCOL` calls for servers that do not
support `PROPFIND`
+ /// or do not require explicit parent collections (for example,
`bazel-remote`).
///
- /// 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.
+ /// Explicit `create_dir` calls are unaffected.
///
- /// Default: false
+ /// Default: `false`
pub disable_create_dir: bool,
/// Disable native recursive listing with WebDAV's `Depth: infinity`.
///
diff --git a/core/services/webdav/src/core.rs b/core/services/webdav/src/core.rs
index b0da34bf2c..35fffc9017 100644
--- a/core/services/webdav/src/core.rs
+++ b/core/services/webdav/src/core.rs
@@ -92,7 +92,7 @@ pub struct WebdavCore {
pub user_metadata_prefix: String,
/// XML namespace URI for user metadata properties.
pub user_metadata_uri: String,
- /// Skip automatic parent directory creation before writes.
+ /// Skip automatic parent directory creation before write, copy, and
rename operations.
pub disable_create_dir: bool,
}
@@ -351,8 +351,10 @@ impl WebdavCore {
from: &str,
to: &str,
) -> Result<Response<Buffer>> {
- // Make sure target's dir is exist.
- self.webdav_mkcol(ctx, get_parent(to)).await?;
+ // Ensure target parent directory exists unless disabled.
+ if !self.disable_create_dir {
+ self.webdav_mkcol(ctx, get_parent(to)).await?;
+ }
let source = build_rooted_absolute_path(&self.root, from);
let source_uri = format!("{}{}", self.endpoint,
percent_encode_path(&source));
diff --git a/website/data/services.json b/website/data/services.json
index 0da4f9758c..e576fdf20d 100644
--- a/website/data/services.json
+++ b/website/data/services.json
@@ -5506,7 +5506,7 @@
"type": "bool",
"required": false,
"group": "General",
- "comments": "Disable automatic parent directory creation before
write operations.\n\nBy default, OpenDAL creates parent directories using MKCOL
before writing files.\nThis requires PROPFIND support to check directory
existence.\n\nSome WebDAV-compatible servers (e.g., bazel-remote) don't support
PROPFIND\nor don't require explicit directory creation. Enable this option to
skip\nthe MKCOL calls and write files directly.\n\nDefault: false"
+ "comments": "Disable automatic parent directory creation before
write, copy, and rename operations.\n\nBy default, OpenDAL creates missing
parent directories using `PROPFIND` and `MKCOL`\nbefore writing, copying, or
renaming files. Enable this option to skip those automatic\nparent directory
checks and `MKCOL` calls for servers that do not support `PROPFIND`\nor do not
require explicit parent collections (for example, `bazel-remote`).\n\nExplicit
`create_dir` calls are unaffect [...]
},
{
"name": "disable_depth_infinity",
@@ -5557,37 +5557,37 @@
"binding": "rust",
"language": "rust",
"minimal": "use opendal::Operator;\n\nlet operator =
Operator::via_iter(\"webdav\", [\n])?;",
- "full": "use opendal::Operator;\n\nlet operator =
Operator::via_iter(\"webdav\", [\n // endpoint of this backend\n //
(\"endpoint\".to_string(), \"...\".to_string()),\n\n // username of this
backend\n // (\"username\".to_string(), \"...\".to_string()),\n\n //
password of this backend\n // (\"password\".to_string(),
\"...\".to_string()),\n\n // token of this backend\n //
(\"token\".to_string(), \"...\".to_string()),\n\n // root of this backend\n
// [...]
+ "full": "use opendal::Operator;\n\nlet operator =
Operator::via_iter(\"webdav\", [\n // endpoint of this backend\n //
(\"endpoint\".to_string(), \"...\".to_string()),\n\n // username of this
backend\n // (\"username\".to_string(), \"...\".to_string()),\n\n //
password of this backend\n // (\"password\".to_string(),
\"...\".to_string()),\n\n // token of this backend\n //
(\"token\".to_string(), \"...\".to_string()),\n\n // root of this backend\n
// [...]
},
{
"binding": "java",
"language": "java",
"minimal": "import java.util.HashMap;\nimport java.util.Map;\nimport
org.apache.opendal.Operator;\n\nMap<String, String> config = new
HashMap<>();\nOperator operator = Operator.of(\"webdav\", config);",
- "full": "import java.util.HashMap;\nimport java.util.Map;\nimport
org.apache.opendal.Operator;\n\nMap<String, String> config = new
HashMap<>();\n// endpoint of this backend\n// config.put(\"endpoint\",
\"...\");\n\n// username of this backend\n// config.put(\"username\",
\"...\");\n\n// password of this backend\n// config.put(\"password\",
\"...\");\n\n// token of this backend\n// config.put(\"token\", \"...\");\n\n//
root of this backend\n// config.put(\"root\", \"...\");\n\n/ [...]
+ "full": "import java.util.HashMap;\nimport java.util.Map;\nimport
org.apache.opendal.Operator;\n\nMap<String, String> config = new
HashMap<>();\n// endpoint of this backend\n// config.put(\"endpoint\",
\"...\");\n\n// username of this backend\n// config.put(\"username\",
\"...\");\n\n// password of this backend\n// config.put(\"password\",
\"...\");\n\n// token of this backend\n// config.put(\"token\", \"...\");\n\n//
root of this backend\n// config.put(\"root\", \"...\");\n\n/ [...]
},
{
"binding": "python",
"language": "python",
"minimal": "import opendal\n\noperator = opendal.Operator(\n
\"webdav\",\n)",
- "full": "import opendal\n\noperator = opendal.Operator(\n
\"webdav\",\n # endpoint of this backend\n # endpoint=\"...\",\n\n #
username of this backend\n # username=\"...\",\n\n # password of this
backend\n # password=\"...\",\n\n # token of this backend\n #
token=\"...\",\n\n # root of this backend\n # root=\"...\",\n\n #
Disable automatic parent directory creation before write operations.\n #\n
# By default, OpenDAL creates parent dir [...]
+ "full": "import opendal\n\noperator = opendal.Operator(\n
\"webdav\",\n # endpoint of this backend\n # endpoint=\"...\",\n\n #
username of this backend\n # username=\"...\",\n\n # password of this
backend\n # password=\"...\",\n\n # token of this backend\n #
token=\"...\",\n\n # root of this backend\n # root=\"...\",\n\n #
Disable automatic parent directory creation before write, copy, and rename
operations.\n #\n # By default, OpenDAL [...]
},
{
"binding": "nodejs",
"language": "javascript",
"minimal": "import { Operator } from \"opendal\";\n\nconst operator
= new Operator(\"webdav\", {\n});",
- "full": "import { Operator } from \"opendal\";\n\nconst operator =
new Operator(\"webdav\", {\n // endpoint of this backend\n // endpoint:
\"...\",\n\n // username of this backend\n // username: \"...\",\n\n //
password of this backend\n // password: \"...\",\n\n // token of this
backend\n // token: \"...\",\n\n // root of this backend\n // root:
\"...\",\n\n // Disable automatic parent directory creation before write
operations.\n //\n // By default, OpenDAL creat [...]
+ "full": "import { Operator } from \"opendal\";\n\nconst operator =
new Operator(\"webdav\", {\n // endpoint of this backend\n // endpoint:
\"...\",\n\n // username of this backend\n // username: \"...\",\n\n //
password of this backend\n // password: \"...\",\n\n // token of this
backend\n // token: \"...\",\n\n // root of this backend\n // root:
\"...\",\n\n // Disable automatic parent directory creation before write,
copy, and rename operations.\n //\n // By defa [...]
},
{
"binding": "ruby",
"language": "ruby",
"minimal": "require \"opendal\"\n\noperator =
OpenDal::Operator.new(\"webdav\", {\n})",
- "full": "require \"opendal\"\n\noperator =
OpenDal::Operator.new(\"webdav\", {\n # endpoint of this backend\n #
\"endpoint\" => \"...\",\n\n # username of this backend\n # \"username\" =>
\"...\",\n\n # password of this backend\n # \"password\" => \"...\",\n\n #
token of this backend\n # \"token\" => \"...\",\n\n # root of this backend\n
# \"root\" => \"...\",\n\n # Disable automatic parent directory creation
before write operations.\n #\n # By default, OpenDAL cre [...]
+ "full": "require \"opendal\"\n\noperator =
OpenDal::Operator.new(\"webdav\", {\n # endpoint of this backend\n #
\"endpoint\" => \"...\",\n\n # username of this backend\n # \"username\" =>
\"...\",\n\n # password of this backend\n # \"password\" => \"...\",\n\n #
token of this backend\n # \"token\" => \"...\",\n\n # root of this backend\n
# \"root\" => \"...\",\n\n # Disable automatic parent directory creation
before write, copy, and rename operations.\n #\n # By de [...]
},
{
"binding": "go",
"language": "go",
"minimal": "import
(\n\t\"github.com/apache/opendal-go-services/webdav\"\n\topendal
\"github.com/apache/opendal/bindings/go\"\n)\n\noperator, err :=
opendal.NewOperator(webdav.Scheme, opendal.OperatorOptions{\n})",
- "full": "import
(\n\t\"github.com/apache/opendal-go-services/webdav\"\n\topendal
\"github.com/apache/opendal/bindings/go\"\n)\n\noperator, err :=
opendal.NewOperator(webdav.Scheme, opendal.OperatorOptions{\n\t// endpoint of
this backend\n\t// \"endpoint\": \"...\",\n\n\t// username of this
backend\n\t// \"username\": \"...\",\n\n\t// password of this backend\n\t//
\"password\": \"...\",\n\n\t// token of this backend\n\t// \"token\":
\"...\",\n\n\t// root of this backend\n\t// \ [...]
+ "full": "import
(\n\t\"github.com/apache/opendal-go-services/webdav\"\n\topendal
\"github.com/apache/opendal/bindings/go\"\n)\n\noperator, err :=
opendal.NewOperator(webdav.Scheme, opendal.OperatorOptions{\n\t// endpoint of
this backend\n\t// \"endpoint\": \"...\",\n\n\t// username of this
backend\n\t// \"username\": \"...\",\n\n\t// password of this backend\n\t//
\"password\": \"...\",\n\n\t// token of this backend\n\t// \"token\":
\"...\",\n\n\t// root of this backend\n\t// \ [...]
}
]
},