| 1534 | } |
| 1535 | |
| 1536 | FileInfo FileInfoFromBlob(std::string_view container, |
| 1537 | const Blobs::Models::BlobItem& blob) { |
| 1538 | auto path = internal::ConcatAbstractPath(container, blob.Name); |
| 1539 | if (internal::HasTrailingSlash(blob.Name)) { |
| 1540 | return DirectoryFileInfoFromPath(path); |
| 1541 | } |
| 1542 | FileInfo info{std::move(path), FileType::File}; |
| 1543 | info.set_size(blob.BlobSize); |
| 1544 | info.set_mtime(std::chrono::system_clock::time_point{blob.Details.LastModified}); |
| 1545 | return info; |
| 1546 | } |
| 1547 | |
| 1548 | /// \brief RAII-style guard for releasing a lease on a blob or container. |
| 1549 | /// |
no test coverage detected