mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
add tagging branches RW/RO/NW
This allows users to tag a branch as readonly or not for writing regardless of how the filesystem is mounted. Should simplify deployments and offer more flexibility.
This commit is contained in:
parent
8dd0dc11ee
commit
b55ebba4ed
57 changed files with 1586 additions and 1210 deletions
12
src/str.cpp
12
src/str.cpp
|
|
@ -147,4 +147,16 @@ namespace str
|
|||
return ((s0.size() >= s1.size()) &&
|
||||
(s0.compare(0,s1.size(),s1) == 0));
|
||||
}
|
||||
|
||||
bool
|
||||
ends_with(const string &str_,
|
||||
const string &suffix_)
|
||||
{
|
||||
if(suffix_.size() > str_.size())
|
||||
return false;
|
||||
|
||||
return std::equal(suffix_.rbegin(),
|
||||
suffix_.rend(),
|
||||
str_.rbegin());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue