5 configuration options · available in Rust
use opendal::Operator;
let operator = Operator::via_iter("smb", [
("endpoint".to_string(), "server.example.com:445".to_string()),
("share".to_string(), "documents".to_string()),
])?;
use opendal::Operator;
let operator = Operator::via_iter("smb", [
// Required server hostname or IP address, with an optional port. The default port is 445.
("endpoint".to_string(), "server.example.com:445".to_string()),
// Required name of the SMB share.
("share".to_string(), "documents".to_string()),
// Root directory within the share. Defaults to `/`.
// ("root".to_string(), "...".to_string()),
// NTLM username, optionally qualified as `DOMAIN\user` or `user@domain`.
// ("user".to_string(), "...".to_string()),
// Password for the configured user.
// ("password".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 |
|---|---|---|---|
endpointe.g. server.example.com:445 | string | yes | Required server hostname or IP address, with an optional port. The default port is 445. |
sharee.g. documents | string | yes | Required name of the SMB share. |
root | string | no | Root directory within the share. Defaults to /. |
user | string | no | NTLM username, optionally qualified as DOMAIN\user or user@domain. |
password | string | no | Password for the configured user. |