| 3474 | } |
| 3475 | |
| 3476 | Status AzureFileSystem::Move(const std::string& src, const std::string& dest) { |
| 3477 | ARROW_ASSIGN_OR_RAISE(auto src_location, AzureLocation::FromString(src)); |
| 3478 | ARROW_ASSIGN_OR_RAISE(auto dest_location, AzureLocation::FromString(dest)); |
| 3479 | if (src_location.container.empty()) { |
| 3480 | return Status::Invalid("Move requires a non-empty source path."); |
| 3481 | } |
| 3482 | if (dest_location.container.empty()) { |
| 3483 | return Status::Invalid("Move requires a non-empty destination path."); |
| 3484 | } |
| 3485 | if (src_location.path.empty()) { |
| 3486 | if (dest_location.path.empty()) { |
| 3487 | return impl_->RenameContainer(src_location, dest_location); |
| 3488 | } |
| 3489 | return impl_->MoveContainerToPath(src_location, dest_location); |
| 3490 | } |
| 3491 | if (dest_location.path.empty()) { |
| 3492 | return impl_->CreateContainerFromPath(src_location, dest_location); |
| 3493 | } |
| 3494 | return impl_->MovePath(src_location, dest_location); |
| 3495 | } |
| 3496 | |
| 3497 | Status AzureFileSystem::CopyFile(const std::string& src, const std::string& dest) { |
| 3498 | ARROW_ASSIGN_OR_RAISE(auto src_location, AzureLocation::FromString(src)); |