src/repositories.h

changeset 52
e9edc3bd0301
parent 37
d7e9a1200e21
--- a/src/repositories.h	Mon May 19 15:34:30 2025 +0200
+++ b/src/repositories.h	Mon May 19 16:05:58 2025 +0200
@@ -25,6 +25,7 @@
 #ifndef REPOSITORIES_H
 #define REPOSITORIES_H
 
+#include <filesystem>
 #include <string>
 #include <vector>
 
@@ -45,10 +46,14 @@
 class repositories final {
     std::vector<repository> m_repositories;
 public:
+    [[nodiscard]] static bool exists(const std::string &path);
     void scan(std::string path, unsigned depth);
     [[nodiscard]] const std::vector<repository>& list() const {
         return m_repositories;
     }
+    [[nodiscard]] size_t count() const {
+        return m_repositories.size();
+    }
 };
 
 } // fm

mercurial