mergerfs/src/branch2.hpp

30 lines
394 B
C++
Raw Normal View History

2024-01-29 12:38:16 +08:00
#pragma once
2024-01-25 11:53:35 +08:00
#include "ghc/filesystem.hpp"
2024-01-26 12:43:00 +08:00
#include "toml.hpp"
2024-01-29 13:55:36 +08:00
#include "enum.h"
2024-01-25 11:52:51 +08:00
#include <stdint.h>
2024-01-29 13:57:26 +08:00
BETTER_ENUM(BranchMode,int,RO,RW,NC);
2024-01-29 13:55:36 +08:00
2024-01-25 11:48:36 +08:00
class Branch2
{
public:
2024-01-29 13:58:24 +08:00
typedef BranchMode Mode;
2024-01-26 12:39:33 +08:00
public:
2024-01-29 13:59:59 +08:00
Branch2();
2024-02-01 13:42:51 +08:00
Branch2(Branch2 &&);
2024-01-26 12:39:33 +08:00
Branch2(toml::value const &);
2024-02-01 11:44:30 +08:00
~Branch2();
2024-01-29 13:58:17 +08:00
2024-01-25 11:48:36 +08:00
public:
2024-02-04 09:56:44 +08:00
bool enabled;
2024-01-29 14:00:46 +08:00
Mode mode;
2024-01-25 11:52:51 +08:00
uint64_t min_free_space;
2024-01-25 12:06:39 +08:00
int fd;
2024-01-25 12:04:13 +08:00
ghc::filesystem::path path;
2024-01-25 11:48:36 +08:00
};