| 634 | } |
| 635 | |
| 636 | time_t DatabaseOnDisk::getObjectMetadataModificationTime(const String & object_name) const |
| 637 | { |
| 638 | auto db_disk = getDisk(); |
| 639 | String table_metadata_path = getObjectMetadataPath(object_name); |
| 640 | if (!db_disk->existsFileOrDirectory(table_metadata_path)) |
| 641 | return static_cast<time_t>(0); |
| 642 | |
| 643 | try |
| 644 | { |
| 645 | return db_disk->getLastModified(table_metadata_path).epochTime(); |
| 646 | } |
| 647 | catch (const fs::filesystem_error & e) |
| 648 | { |
| 649 | if (e.code() == std::errc::no_such_file_or_directory) |
| 650 | { |
| 651 | return static_cast<time_t>(0); |
| 652 | } |
| 653 | throw; |
| 654 | } |
| 655 | } |
| 656 | |
| 657 | void DatabaseOnDisk::iterateMetadataFiles(const IteratingFunction & process_metadata_file) const |
| 658 | { |
no test coverage detected