mergerfs/src/branch2.hpp

33 lines
515 B
C++
Raw Normal View History

2024-01-28 22:38:16 -06:00
#pragma once
2024-01-24 21:53:35 -06:00
#include "ghc/filesystem.hpp"
2024-01-25 22:43:00 -06:00
#include "toml.hpp"
2024-01-28 23:55:36 -06:00
#include "enum.h"
2024-01-24 21:52:51 -06:00
#include <stdint.h>
2024-01-28 23:57:26 -06:00
BETTER_ENUM(BranchMode,int,RO,RW,NC);
2024-01-28 23:55:36 -06:00
2024-01-24 21:48:36 -06:00
class Branch2
{
public:
2024-01-28 23:58:24 -06:00
typedef BranchMode Mode;
2024-01-25 22:39:33 -06:00
public:
2024-01-28 23:59:59 -06:00
Branch2();
2024-03-10 17:29:17 -05:00
Branch2(Branch2 const &);
2024-01-31 23:42:51 -06:00
Branch2(Branch2 &&);
2024-03-10 17:29:17 -05:00
Branch2(toml::value const &value,
2024-03-10 17:31:53 -05:00
uint64_t const min_free_space = 0);
2024-01-31 21:44:30 -06:00
~Branch2();
2024-02-07 20:48:03 -06:00
Branch2& operator=(Branch2 const &);
2024-01-28 23:58:17 -06:00
2024-01-24 21:48:36 -06:00
public:
2024-02-03 19:56:44 -06:00
bool enabled;
2024-01-29 00:00:46 -06:00
Mode mode;
2024-01-24 21:52:51 -06:00
uint64_t min_free_space;
2024-01-24 22:06:39 -06:00
int fd;
2024-01-24 22:04:13 -06:00
ghc::filesystem::path path;
2024-01-24 21:48:36 -06:00
};