tisonkun commented on code in PR #7118:
URL: https://github.com/apache/opendal/pull/7118#discussion_r2678312231
##########
integrations/object_store/src/store.rs:
##########
@@ -576,11 +571,23 @@ impl ObjectStore for OpendalStore {
})
}
- async fn copy(&self, from: &Path, to: &Path) -> object_store::Result<()> {
- self.copy_request(from, to, false).await
+ async fn copy_opts(
+ &self,
+ from: &Path,
+ to: &Path,
+ options: object_store::CopyOptions,
+ ) -> object_store::Result<()> {
+ let if_not_exists = matches!(options.mode,
object_store::CopyMode::Create);
+ self.copy_request(from, to, if_not_exists).await
}
- async fn rename(&self, from: &Path, to: &Path) -> object_store::Result<()>
{
+ async fn rename_opts(
+ &self,
+ from: &Path,
+ to: &Path,
+ // TODO: if we need to support rename options in the future
+ _options: RenameOptions,
Review Comment:
Seems OpenDAL doesn't support different rename mode now.
##########
integrations/object_store/src/store.rs:
##########
@@ -592,10 +599,6 @@ impl ObjectStore for OpendalStore {
Ok(())
}
-
- async fn copy_if_not_exists(&self, from: &Path, to: &Path) ->
object_store::Result<()> {
- self.copy_request(from, to, true).await
- }
Review Comment:
Moved to `ObjectStoreExt`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]