MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / DeleteFile

Method DeleteFile

tensorflow/core/platform/s3/s3_file_system.cc:505–519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

503}
504
505Status S3FileSystem::DeleteFile(const string& fname) {
506 string bucket, object;
507 TF_RETURN_IF_ERROR(ParseS3Path(fname, false, &bucket, &object));
508
509 Aws::S3::Model::DeleteObjectRequest deleteObjectRequest;
510 deleteObjectRequest.WithBucket(bucket.c_str()).WithKey(object.c_str());
511
512 auto deleteObjectOutcome =
513 this->GetS3Client()->DeleteObject(deleteObjectRequest);
514 if (!deleteObjectOutcome.IsSuccess()) {
515 return errors::Unknown(deleteObjectOutcome.GetError().GetExceptionName(),
516 ": ", deleteObjectOutcome.GetError().GetMessage());
517 }
518 return Status::OK();
519}
520
521Status S3FileSystem::CreateDir(const string& dirname) {
522 string bucket, object;

Callers 1

TEST_FFunction · 0.45

Calls 5

GetS3ClientMethod · 0.95
ParseS3PathFunction · 0.85
c_strMethod · 0.80
GetErrorMethod · 0.80
UnknownClass · 0.50

Tested by 1

TEST_FFunction · 0.36