34 : path(std::move(path)), |
34 : path(std::move(path)), |
35 name(fs::path(this->path).filename()), |
35 name(fs::path(this->path).filename()), |
36 type(type) { |
36 type(type) { |
37 } |
37 } |
38 |
38 |
|
39 bool repositories::exists(const std::string &path) { |
|
40 return fs::is_directory(path); |
|
41 } |
|
42 |
39 void repositories::scan(std::string path, unsigned depth) { |
43 void repositories::scan(std::string path, unsigned depth) { |
40 // check the base path |
44 // check the base path |
41 { |
45 { |
42 auto p = fs::path{path}; |
46 auto p = fs::path{path}; |
43 if (is_directory(p / ".hg")) { |
47 if (is_directory(p / ".hg")) { |