List objects from [object_store] with the given prefix and depth,
and an implementation specific delimiter.
Returns common prefixes (directories) in addition to object metadata.
For example, say that a bucket contains the following objects:
a.txtfoo/b.txtfoo/bar/c.txtfoo/bar/d.txt
Calling [list_with_depth] with depth = 0 is equivalent to calling
[ObjectStore::list_with_delimiter]: It will return the objects and common
prefixes at the root: objects=["a.txt"] and common_prefixes=["foo"].
Calling [list_with_depth] with depth = 1 will recurse once, and return
objects=["foo/b.txt"] and common_prefixes=["foo/bar"].
The equivalent commands at a Unix command line would be:
ls *(depth=0)ls */*(depth=1)ls */*/*(depth=2)- etc.
Prefixes are evaluated on a path segment basis, i.e. foo/bar is a
prefix of foo/bar/x but not of foo/bar_baz/x.
Example
use Arc;
use list_with_depth;
use ;
async