You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
626 B

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
8 months ago
10 months ago
8 months ago
8 months ago
10 months ago
9 months ago
10 months ago
8 months ago
8 months ago
8 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
8 months ago
10 months ago
  1. #pragma once
  2. #include "ghc/filesystem.hpp"
  3. #include "toml.hpp"
  4. #include "enum.h"
  5. #include <stdint.h>
  6. BETTER_ENUM(BranchMode,int,RO,RW,NC);
  7. class Branch2
  8. {
  9. public:
  10. typedef BranchMode Mode;
  11. public:
  12. Branch2();
  13. Branch2(Branch2 const &);
  14. Branch2(Branch2 &&);
  15. Branch2(toml::value const &value,
  16. uint64_t const min_free_space = 0);
  17. ~Branch2();
  18. Branch2& operator=(Branch2 const &);
  19. public:
  20. bool matches_exclude(ghc::filesystem::path const &path) const;
  21. public:
  22. bool enabled;
  23. Mode mode;
  24. uint64_t min_free_space;
  25. int fd;
  26. ghc::filesystem::path path;
  27. std::vector<std::string> excludes;
  28. };