This function assumes info->path() is already set
| 2232 | |
| 2233 | // This function assumes info->path() is already set |
| 2234 | void 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 | |
| 2245 | void FileObjectToInfo(const S3Model::Object& obj, FileInfo* info) { |
| 2246 | info->set_type(FileType::File); |
no test coverage detected