Skip to content

Conversation

@asukaminato0721
Copy link
Contributor

@asukaminato0721 asukaminato0721 commented Mar 22, 2025

Which issue does this PR close?

part of #2959.

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

add opendal_operator_check

@asukaminato0721 asukaminato0721 changed the title add opendal_operator_remove && opendal_operator_remove_all feat(bindings/c): add opendal_operator_remove && opendal_operator_remove_all Mar 22, 2025
@github-actions github-actions bot added the releases-note/feat The PR implements a new feature or has a title that begins with "feat" label Mar 22, 2025
@asukaminato0721
Copy link
Contributor Author

todo: test, doc

@Xuanwo
Copy link
Member

Xuanwo commented Mar 22, 2025

remove_xxx APIs are going to deprecate after delete support recursive. Let's hold on for a while.

@asukaminato0721 asukaminato0721 changed the title feat(bindings/c): add opendal_operator_remove && opendal_operator_remove_all feat(bindings/c): add opendal_operator_remove && opendal_operator_remove_all && opendal_operator_check Mar 23, 2025
@asukaminato0721 asukaminato0721 marked this pull request as ready for review March 23, 2025 13:26
@Xuanwo Xuanwo marked this pull request as draft March 24, 2025 00:43
@Xuanwo
Copy link
Member

Xuanwo commented Mar 24, 2025

remove_xxx APIs are going to deprecate after delete support recursive. Let's hold on for a while.

It's better not to introduce those API before we has #3922 implemented.

@asukaminato0721 asukaminato0721 changed the title feat(bindings/c): add opendal_operator_remove && opendal_operator_remove_all && opendal_operator_check feat(bindings/c): add opendal_operator_check Mar 24, 2025
@asukaminato0721 asukaminato0721 marked this pull request as ready for review March 24, 2025 09:53
Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @asukaminato0721 for this!

@Xuanwo Xuanwo merged commit 8c72db9 into apache:main Mar 25, 2025
247 checks passed
@asukaminato0721 asukaminato0721 deleted the c-rename branch March 25, 2025 12:22
@chitralverma
Copy link
Contributor

@asukaminato0721 @Xuanwo shouldn't this lister be triggered with limit(1) or perhaps a stat call?

@asukaminato0721
Copy link
Contributor Author

asukaminato0721 commented Mar 26, 2025

@asukaminato0721 @Xuanwo shouldn't this lister be triggered with limit(1) or perhaps a stat call?

it's the same "code" as the async version.

pub async fn check(&self) -> Result<()> {
let mut ds = self.lister("/").await?;
match ds.next().await {
Some(Err(e)) if e.kind() != ErrorKind::NotFound => Err(e),
_ => Ok(()),
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

releases-note/feat The PR implements a new feature or has a title that begins with "feat"

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants