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

Function ErrnoFromStatus

cpp/src/arrow/filesystem/gcsfs_internal.cc:42–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40using GcsCode = google::cloud::StatusCode;
41
42int ErrnoFromStatus(const google::cloud::Status& s) {
43 switch (s.code()) {
44 case GcsCode::kAlreadyExists:
45 return EEXIST;
46 case GcsCode::kInvalidArgument:
47 return EINVAL;
48 case GcsCode::kNotFound:
49 return ENOENT;
50 case GcsCode::kPermissionDenied:
51 case GcsCode::kUnauthenticated:
52 return EACCES;
53 default:
54 return 0;
55 }
56}
57
58Status ToArrowStatus(const google::cloud::Status& s) {
59 std::ostringstream os;

Callers 6

DeleteDirContentsMethod · 0.70
TestGetFileInfoMethod · 0.70
TEST_FFunction · 0.70
AssertRaisesWithErrnoFunction · 0.70
ToArrowStatusFunction · 0.70

Calls 1

codeMethod · 0.45

Tested by 3

TestGetFileInfoMethod · 0.56
TEST_FFunction · 0.56
AssertRaisesWithErrnoFunction · 0.56