Update submitting bug reports, improve collect-info (#1598)
Some checks failed
mkdocs / deploy (push) Has been cancelled

This commit is contained in:
trapexit 2025-12-06 13:55:14 -06:00 • committed by GitHub
parent 9b046d9a34
commit 72fb6e4aba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 127 additions and 63 deletions

View file

@ -1,5 +1,7 @@
#include "mergerfs_api.hpp"
#include "fs_xattr.hpp"
#include "fs_exists.hpp"
#include "fs_lgetxattr.hpp"
#include "str.hpp"
@ -33,6 +35,27 @@ _lgetxattr(const std::string &input_path_,
return rv;
}
bool
mergerfs::api::is_mergerfs(const fs::path &mountpoint_)
{
fs::path dot_mergerfs_filepath;
dot_mergerfs_filepath = mountpoint_ / ".mergerfs";
return fs::exists(dot_mergerfs_filepath);
}
int
mergerfs::api::get_kvs(const fs::path &mountpoint_,
std::map<std::string,std::string> *kvs_)
{
fs::path dot_mergerfs_filepath;
dot_mergerfs_filepath = mountpoint_ / ".mergerfs";
return fs::xattr::get(dot_mergerfs_filepath,kvs_);
}
int
mergerfs::api::allpaths(const std::string &input_path_,
std::vector<std::string> &output_paths_)