From c4fbe5ab7a8ff802452c9a88ea909c64643edcb9 Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Fri, 2 Jan 2026 13:23:58 -0600 Subject: [PATCH] mergerfs_api.cpp --- src/mergerfs_api.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/mergerfs_api.cpp b/src/mergerfs_api.cpp index 9a6dab84..e79745f3 100644 --- a/src/mergerfs_api.cpp +++ b/src/mergerfs_api.cpp @@ -66,6 +66,18 @@ mergerfs::api::get_kvs(const fs::path &mountpoint_, return fs::xattr::get(dot_mergerfs_filepath,kvs_); } +int +mergerfs::api::set_kv(const fs::path &mountpoint_, + const std::string &key_, + const std::string &val_) +{ + fs::path dot_mergerfs_filepath; + + dot_mergerfs_filepath = mountpoint_ / ".mergerfs"; + + return fs::xattr::set(dot_mergerfs_filepath,key_,val_,0); +} + int mergerfs::api::allpaths(const std::string &input_path_, std::vector &output_paths_)