| 1973 | |
| 1974 | template <typename OnContainer> |
| 1975 | Status VisitContainers(const Core::Context& context, OnContainer&& on_container) const { |
| 1976 | Blobs::ListBlobContainersOptions options; |
| 1977 | try { |
| 1978 | auto container_list_response = |
| 1979 | blob_service_client_->ListBlobContainers(options, context); |
| 1980 | SkipStartingEmptyPages(container_list_response); |
| 1981 | for (; container_list_response.HasPage(); |
| 1982 | container_list_response.MoveToNextPage(context)) { |
| 1983 | for (const auto& container : container_list_response.BlobContainers) { |
| 1984 | RETURN_NOT_OK(on_container(container)); |
| 1985 | } |
| 1986 | } |
| 1987 | } catch (const Core::RequestFailedException& exception) { |
| 1988 | return ExceptionToStatus(exception, "Failed to list account containers."); |
| 1989 | } |
| 1990 | return Status::OK(); |
| 1991 | } |
| 1992 | |
| 1993 | static std::string_view BasenameView(std::string_view s) { |
| 1994 | DCHECK(!internal::HasTrailingSlash(s)); |
nothing calls this directly
no test coverage detected