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

Function SetPathInfo

cpp/src/arrow/filesystem/hdfs.cc:59–74  ·  view source on GitHub ↗

TODO(wesm): this could throw std::bad_alloc in the course of copying strings into the path info object

Source from the content-addressed store, hash-verified

57// TODO(wesm): this could throw std::bad_alloc in the course of copying strings
58// into the path info object
59static void SetPathInfo(const hdfsFileInfo* input, HdfsPathInfo* out) {
60 out->kind = input->mKind == kObjectKindFile ? arrow::fs::FileType::File
61 : arrow::fs::FileType::Directory;
62 out->name = std::string(input->mName);
63 out->owner = std::string(input->mOwner);
64 out->group = std::string(input->mGroup);
65
66 out->last_access_time = static_cast<int32_t>(input->mLastAccess);
67 out->last_modified_time = static_cast<int32_t>(input->mLastMod);
68 out->size = static_cast<int64_t>(input->mSize);
69
70 out->replication = input->mReplication;
71 out->block_size = input->mBlockSize;
72
73 out->permissions = input->mPermissions;
74}
75
76namespace {
77

Callers 2

GetPathInfoStatusMethod · 0.85
ListDirectoryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected