| 3420 | } |
| 3421 | |
| 3422 | Status AzureFileSystem::DeleteDirContents(const std::string& path, bool missing_dir_ok) { |
| 3423 | ARROW_ASSIGN_OR_RAISE(auto location, AzureLocation::FromString(path)); |
| 3424 | if (location.container.empty()) { |
| 3425 | return internal::InvalidDeleteDirContents(location.all); |
| 3426 | } |
| 3427 | |
| 3428 | auto adlfs_client = impl_->GetFileSystemClient(location.container); |
| 3429 | ARROW_ASSIGN_OR_RAISE(auto hns_support, |
| 3430 | impl_->HierarchicalNamespaceSupport(adlfs_client)); |
| 3431 | if (hns_support == HNSSupport::kContainerNotFound) { |
| 3432 | return missing_dir_ok ? Status::OK() : PathNotFound(location); |
| 3433 | } |
| 3434 | |
| 3435 | if (hns_support == HNSSupport::kEnabled) { |
| 3436 | return impl_->DeleteDirContentsOnFileSystem(adlfs_client, location, missing_dir_ok); |
| 3437 | } |
| 3438 | auto container_client = impl_->GetBlobContainerClient(location.container); |
| 3439 | return impl_->DeleteDirContentsOnContainer(container_client, location, |
| 3440 | /*require_dir_to_exist=*/!missing_dir_ok, |
| 3441 | /*preserve_dir_marker_blob=*/true, |
| 3442 | "DeleteDirContents"); |
| 3443 | } |
| 3444 | |
| 3445 | Status AzureFileSystem::DeleteRootDirContents() { |
| 3446 | return Status::NotImplemented("Cannot delete all Azure Blob Storage containers"); |
nothing calls this directly
no test coverage detected