MCPcopy Create free account
hub / github.com/apache/arrow / MoveContainerToPath

Function MoveContainerToPath

cpp/src/arrow/filesystem/azurefs.cc:3063–3080  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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());

Callers

nothing calls this directly

Calls 5

InvalidDirMoveToSubdirFunction · 0.85
PathNotFoundFunction · 0.70
emptyMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected