File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 1313 Store ,
1414 SuffixByteRequest ,
1515)
16+ from zarr .core .common import concurrent_map
1617from zarr .core .config import config
1718
1819if TYPE_CHECKING :
@@ -196,6 +197,15 @@ async def delete(self, key: str) -> None:
196197 with contextlib .suppress (FileNotFoundError ):
197198 await obs .delete_async (self .store , key )
198199
200+ async def delete_dir (self , prefix : str ) -> None :
201+ # docstring inherited
202+ self ._check_writable ()
203+ if prefix != "" and not prefix .endswith ("/" ):
204+ prefix += "/"
205+
206+ keys = [(k ,) async for k in self .list_prefix (prefix )]
207+ await concurrent_map (keys , self .delete , limit = config .get ("async.concurrency" ))
208+
199209 @property
200210 def supports_partial_writes (self ) -> bool :
201211 # docstring inherited
You can’t perform that action at this time.
0 commit comments