Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions bindings/python/python/opendal/capability.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ class Capability:
def list_with_recursive(self) -> builtins.bool:
r"""If backend supports list without delimiter."""
@property
def list_with_versions(self) -> builtins.bool:
r"""If backend supports list with versions."""
@property
def list_with_deleted(self) -> builtins.bool:
r"""If backend supports list with deleted."""
@property
def presign(self) -> builtins.bool:
r"""If operator supports presign."""
@property
Expand Down
6 changes: 6 additions & 0 deletions bindings/python/src/capability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ pub struct Capability {
pub list_with_start_after: bool,
/// If backend supports list without delimiter.
pub list_with_recursive: bool,
/// If backend supports list with versions.
pub list_with_versions: bool,
/// If backend supports list with deleted.
pub list_with_deleted: bool,

/// If operator supports presign.
pub presign: bool,
Expand Down Expand Up @@ -166,6 +170,8 @@ impl Capability {
list_with_limit: capability.list_with_limit,
list_with_start_after: capability.list_with_start_after,
list_with_recursive: capability.list_with_recursive,
list_with_versions: capability.list_with_versions,
list_with_deleted: capability.list_with_deleted,
presign: capability.presign,
presign_read: capability.presign_read,
presign_stat: capability.presign_stat,
Expand Down
10 changes: 10 additions & 0 deletions bindings/python/tests/test_capability.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ def test_capability(service_name, operator):
assert cap.read is not None


def test_capability_list_flags(service_name, operator):
cap = operator.capability()
assert cap is not None
assert cap.list_with_limit is not None
assert cap.list_with_start_after is not None
assert cap.list_with_recursive is not None
assert cap.list_with_versions is not None
assert cap.list_with_deleted is not None


def test_capability_exception(service_name, operator):
cap = operator.capability()
assert cap is not None
Expand Down
Loading