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

Method DeleteFile

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

Source from the content-addressed store, hash-verified

559 }
560
561 Status DeleteFile(const GcsPath& p) {
562 if (!p.object.empty()) {
563 auto stat = client_.GetObjectMetadata(p.bucket, p.object);
564 if (!stat) return internal::ToArrowStatus(stat.status());
565 if (IsDirectory(*stat)) {
566 return Status::IOError("The given path '", p.full_path,
567 "' is a directory, use DeleteDir");
568 }
569 }
570 return internal::ToArrowStatus(client_.DeleteObject(p.bucket, p.object));
571 }
572
573 Status Move(const GcsPath& src, const GcsPath& dest) {
574 if (src == dest) return Status::OK();

Callers

nothing calls this directly

Calls 7

IOErrorFunction · 0.85
GetObjectMetadataMethod · 0.80
DeleteObjectMethod · 0.80
ToArrowStatusFunction · 0.70
IsDirectoryFunction · 0.70
emptyMethod · 0.45
statusMethod · 0.45

Tested by

no test coverage detected