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

Function FileObjectToInfo

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

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

Source from the content-addressed store, hash-verified

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