| 514 | } |
| 515 | |
| 516 | Status DeleteDir(const GcsPath& p, const io::IOContext& io_context) { |
| 517 | RETURN_NOT_OK(DeleteDirContents(p, /*missing_dir_ok=*/false, io_context)); |
| 518 | if (!p.object.empty()) { |
| 519 | auto canonical = std::string(internal::EnsureTrailingSlash(p.object)); |
| 520 | return internal::ToArrowStatus(client_.DeleteObject(p.bucket, canonical)); |
| 521 | } |
| 522 | return internal::ToArrowStatus(client_.DeleteBucket(p.bucket)); |
| 523 | } |
| 524 | |
| 525 | Status DeleteDirContents(const GcsPath& p, bool missing_dir_ok, |
| 526 | const io::IOContext& io_context) { |
nothing calls this directly
no test coverage detected