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

Function FileObjectToInfo

cpp/src/arrow/filesystem/s3fs.cc:2236–2245  ·  view source on GitHub ↗

This function assumes info->path() is already set

Source from the content-addressed store, hash-verified

2234
2235// This function assumes info->path() is already set
2236void FileObjectToInfo(std::string_view key, const S3Model::HeadObjectResult& obj,
2237 FileInfo* info) {
2238 if (IsDirectory(key, obj)) {
2239 info->set_type(FileType::Directory);
2240 } else {
2241 info->set_type(FileType::File);
2242 }
2243 info->set_size(static_cast<int64_t>(obj.GetContentLength()));
2244 info->set_mtime(FromAwsDatetime(obj.GetLastModified()));
2245}
2246
2247void FileObjectToInfo(const S3Model::Object& obj, FileInfo* info) {
2248 info->set_type(FileType::File);

Callers 2

ToFileInfosMethod · 0.85
GetFileInfoMethod · 0.85

Calls 4

FromAwsDatetimeFunction · 0.85
IsDirectoryFunction · 0.70
GetContentLengthMethod · 0.45
GetSizeMethod · 0.45

Tested by

no test coverage detected