Skip to content

Commit

Permalink
Expose file_io.list (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeiPatiakin authored Jan 21, 2025
1 parent cb5c365 commit 4c42c87
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crates/iceberg/src/io/file_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,16 @@ impl FileIO {
Ok(op.exists(relative_path).await?)
}

/// List the path and all nested dirs and files recursively.
///
/// # Arguments
///
/// * path: It should be *absolute* path starting with scheme string used to construct [`FileIO`].
pub async fn list(&self, path: impl AsRef<str>) -> Result<Vec<opendal::Entry>> {
let (op, relative_path) = self.inner.create_operator(&path)?;
Ok(op.list(relative_path).await?)
}

/// Creates input file.
///
/// # Arguments
Expand Down

0 comments on commit 4c42c87

Please sign in to comment.