| 3061 | } |
| 3062 | |
| 3063 | Status MoveContainerToPath(const AzureLocation& src, const AzureLocation& dest) { |
| 3064 | DCHECK(!src.container.empty() && src.path.empty()); |
| 3065 | DCHECK(!dest.container.empty() && !dest.path.empty()); |
| 3066 | // Check Move pre-condition 1 -- `src` must exist. |
| 3067 | auto container_client = GetBlobContainerClient(src.container); |
| 3068 | ARROW_ASSIGN_OR_RAISE(auto src_info, |
| 3069 | GetContainerPropsAsFileInfo(src, container_client)); |
| 3070 | if (src_info.type() == FileType::NotFound) { |
| 3071 | return PathNotFound(src); |
| 3072 | } |
| 3073 | // Check Move pre-condition 2. |
| 3074 | if (src.container == dest.container) { |
| 3075 | return InvalidDirMoveToSubdir(src, dest); |
| 3076 | } |
| 3077 | // Instead of checking more pre-conditions, we just abort with a |
| 3078 | // NotImplemented status. |
| 3079 | return CrossContainerMoveNotImplemented(src, dest); |
| 3080 | } |
| 3081 | |
| 3082 | Status CreateContainerFromPath(const AzureLocation& src, const AzureLocation& dest) { |
| 3083 | DCHECK(!src.container.empty() && !src.path.empty()); |
nothing calls this directly
no test coverage detected