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

Method CopyFile

cpp/src/arrow/filesystem/gcsfs.cc:594–606  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

592 }
593
594 Status CopyFile(const GcsPath& src, const GcsPath& dest) {
595 auto parent = dest.parent();
596 if (!parent.object.empty()) {
597 ARROW_ASSIGN_OR_RAISE(auto parent_info, GetFileInfo(parent));
598 if (parent_info.IsFile()) {
599 return Status::IOError("Cannot use file '", parent.full_path,
600 "' as a destination directory");
601 }
602 }
603 auto metadata =
604 client_.RewriteObjectBlocking(src.bucket, src.object, dest.bucket, dest.object);
605 return internal::ToArrowStatus(metadata.status());
606 }
607
608 Result<std::shared_ptr<GcsInputStream>> OpenInputStream(const GcsPath& path,
609 gcs::Generation generation,

Callers

nothing calls this directly

Calls 6

IOErrorFunction · 0.85
IsFileMethod · 0.80
ToArrowStatusFunction · 0.70
parentMethod · 0.45
emptyMethod · 0.45
statusMethod · 0.45

Tested by

no test coverage detected