TODO(wesm): this could throw std::bad_alloc in the course of copying strings into the path info object
| 57 | // TODO(wesm): this could throw std::bad_alloc in the course of copying strings |
| 58 | // into the path info object |
| 59 | static 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 | |
| 76 | namespace { |
| 77 |
no outgoing calls
no test coverage detected