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:
Antonio SJ Musumeci 2018-10-20 23:40:02 -04:00
parent 8dd0dc11ee
commit b55ebba4ed
57 changed files with 1586 additions and 1210 deletions

View file

@ -27,25 +27,16 @@ using std::vector;
namespace fs
{
void
glob(const vector<string> &patterns_,
vector<string> &strs_)
glob(const string &pattern_,
vector<string> &strs_)
{
int flags;
size_t veclen;
glob_t gbuf = {0};
veclen = patterns_.size();
if(veclen == 0)
return;
flags = GLOB_NOCHECK;
::glob(patterns_[0].c_str(),flags,NULL,&gbuf);
::glob(pattern_.c_str(),flags,NULL,&gbuf);
flags = GLOB_APPEND|GLOB_NOCHECK;
for(size_t i = 1; i < veclen; i++)
::glob(patterns_[i].c_str(),flags,NULL,&gbuf);
for(size_t i = 0; i < gbuf.gl_pathc; ++i)
for(size_t i = 0; i < gbuf.gl_pathc; i++)
strs_.push_back(gbuf.gl_pathv[i]);
::globfree(&gbuf);