diff --git a/crates/iceberg/src/io/file_io.rs b/crates/iceberg/src/io/file_io.rs index 93cfda904..4c8135ced 100644 --- a/crates/iceberg/src/io/file_io.rs +++ b/crates/iceberg/src/io/file_io.rs @@ -318,6 +318,11 @@ impl OutputFile { &self.path } + /// Underlying OpenDAL operator. + pub fn operator(&self) -> &Operator { + &self.op + } + /// Checks if file exists. pub async fn exists(&self) -> crate::Result { Ok(self.op.exists(&self.path[self.relative_path_pos..]).await?) @@ -344,16 +349,6 @@ impl OutputFile { writer.close().await } - /// Create a new output file with given bytes. - /// Error out if the file already exists - pub async fn write_exclusive(&self, bs: Bytes) -> crate::Result<()> { - self.op - .write_with(&self.path[self.relative_path_pos..], bs) - .if_none_match("*") - .await?; - Ok(()) - } - /// Creates output file for continues writing. /// /// # Notes