| 137 | } |
| 138 | |
| 139 | static void changeOwnership(const String & file_name, const String & user_name, const String & group_name = {}, bool recursive = true) |
| 140 | { |
| 141 | if (!user_name.empty() || !group_name.empty()) |
| 142 | { |
| 143 | std::string command = fmt::format("chown {} {}:{} {}", |
| 144 | (recursive ? "-R" : ""), shellQuote(user_name), shellQuote(group_name), shellQuote(file_name)); |
| 145 | fmt::print(" {}\n", command); |
| 146 | executeScript(command); |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | static void createGroup(const String & group_name) |
| 151 | { |
no test coverage detected