mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-20 15:06:33 -05:00
40 lines
571 B
C++
40 lines
571 B
C++
#pragma once
|
|
|
|
#include "tofrom_string.hpp"
|
|
#include "from_string.hpp"
|
|
|
|
#include "fuse_cfg.hpp"
|
|
|
|
|
|
class CfgNoforget : public ToFromString
|
|
{
|
|
public:
|
|
int
|
|
from_string(const std::string_view s_)
|
|
{
|
|
int rv;
|
|
bool b = false;
|
|
|
|
rv = str::from(s_,&b);
|
|
if((b == true) || s_.empty())
|
|
{
|
|
fuse_cfg.remember_nodes = -1;
|
|
return 0;
|
|
}
|
|
|
|
if(rv)
|
|
return rv;
|
|
|
|
fuse_cfg.remember_nodes = 0;
|
|
|
|
return 0;
|
|
}
|
|
|
|
std::string
|
|
to_string() const
|
|
{
|
|
if(fuse_cfg.remember_nodes == -1)
|
|
return "true";
|
|
return "false";
|
|
}
|
|
};
|