This function assumes info->path() is already set
| 2173 | |
| 2174 | // This function assumes info->path() is already set |
| 2175 | void FileObjectToInfo(std::string_view key, const S3Model::HeadObjectResult& obj, |
| 2176 | FileInfo* info) { |
| 2177 | if (IsDirectory(key, obj)) { |
| 2178 | info->set_type(FileType::Directory); |
| 2179 | } else { |
| 2180 | info->set_type(FileType::File); |
| 2181 | } |
| 2182 | info->set_size(static_cast<int64_t>(obj.GetContentLength())); |
| 2183 | info->set_mtime(FromAwsDatetime(obj.GetLastModified())); |
| 2184 | } |
| 2185 | |
| 2186 | void FileObjectToInfo(const S3Model::Object& obj, FileInfo* info) { |
| 2187 | info->set_type(FileType::File); |
no test coverage detected