MCPcopy Create free account
hub / github.com/apache/arrow / _delete_dir_contents

Method _delete_dir_contents

python/pyarrow/fs.py:365–376  ·  view source on GitHub ↗
(self, path, missing_dir_ok)

Source from the content-addressed store, hash-verified

363 self.fs.rm(path, recursive=True)
364
365 def _delete_dir_contents(self, path, missing_dir_ok):
366 try:
367 subpaths = self.fs.listdir(path, detail=False)
368 except FileNotFoundError:
369 if missing_dir_ok:
370 return
371 raise
372 for subpath in subpaths:
373 if self.fs.isdir(subpath):
374 self.fs.rm(subpath, recursive=True)
375 elif self.fs.isfile(subpath):
376 self.fs.rm(subpath)
377
378 def delete_dir_contents(self, path, missing_dir_ok):
379 if path.strip("/") == "":

Callers 2

delete_dir_contentsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected