Struct opendal::BatchOperator
source · [−]pub struct BatchOperator { /* private fields */ }
Expand description
BatchOperator is used to take batch operations like walk_dir and remove_all, should
be constructed by Operator::batch()
.
TODO
We will support batch operators between two different operators like copy and move.
Implementations
sourceimpl BatchOperator
impl BatchOperator
sourcepub fn walk(&self, path: &str) -> Result<ObjectStreamer>
pub fn walk(&self, path: &str) -> Result<ObjectStreamer>
Walk a dir in the best way that suitable for underlying storage.
The returning order could be differ for different underlying storage. And could be changed at any time. Users MUST NOT relay on the order.
sourcepub fn walk_top_down(&self, path: &str) -> Result<ObjectStreamer>
pub fn walk_top_down(&self, path: &str) -> Result<ObjectStreamer>
Walk a dir in top down way: list current dir first and then list nested dir.
Refer to TopDownWalker
for more about the behavior details.
sourcepub fn walk_bottom_up(&self, path: &str) -> Result<ObjectStreamer>
pub fn walk_bottom_up(&self, path: &str) -> Result<ObjectStreamer>
Walk a dir in bottom up way: list nested dir first and then current dir.
Refer to BottomUpWalker
for more about the behavior details.
sourcepub async fn remove_all(&self, path: &str) -> Result<()>
pub async fn remove_all(&self, path: &str) -> Result<()>
Remove the path and all nested dirs and files recursively.
Use this function in cautions to avoid unexpected data loss.
Trait Implementations
sourceimpl Clone for BatchOperator
impl Clone for BatchOperator
sourcefn clone(&self) -> BatchOperator
fn clone(&self) -> BatchOperator
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more