mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-30 03:47:02 -05:00
* Provides: slight improvement in performance as it no longer will need to find and then act on the files. * It doesn't make sense to support all original policy types. Most people used 'newest' or 'ff' and 'combine' is a better default which has same runtime as 'newest' but with better output.
41 lines
659 B
C++
41 lines
659 B
C++
#pragma once
|
|
|
|
#include "config.hpp"
|
|
#include "tofrom_string.hpp"
|
|
|
|
class ConfigGetAttrStatx : public ToFromString
|
|
{
|
|
private:
|
|
Func2::GetAttr &_getattr;
|
|
Func2::Statx &_statx;
|
|
|
|
public:
|
|
ConfigGetAttrStatx() = delete;
|
|
ConfigGetAttrStatx(Func2::GetAttr &getattr_,
|
|
Func2::Statx &statx_)
|
|
: _getattr(getattr_),
|
|
_statx(statx_)
|
|
{
|
|
}
|
|
|
|
std::string
|
|
to_string() const
|
|
{
|
|
return _getattr.to_string();
|
|
}
|
|
|
|
int
|
|
from_string(const std::string_view str_)
|
|
{
|
|
int rv;
|
|
|
|
rv = _getattr.from_string(str_);
|
|
if(rv < 0)
|
|
return rv;
|
|
|
|
rv = _statx.from_string(str_);
|
|
assert(rv == 0);
|
|
|
|
return rv;
|
|
}
|
|
};
|