+// WriteOkay - varaidic helper to easily Write to a FileFd /*{{{*/
+static bool WriteOkay_fn(FileFd &) { return true; }
+template<typename... Tail> static bool WriteOkay_fn(FileFd &output, APT::StringView data, Tail... more_data)
+{
+ return likely(output.Write(data.data(), data.length()) && WriteOkay_fn(output, more_data...));
+}
+template<typename... Tail> static bool WriteOkay_fn(FileFd &output, unsigned int data, Tail... more_data)
+{
+ std::string number;
+ strprintf(number, "%d", data);
+ return likely(output.Write(number.data(), number.length()) && WriteOkay_fn(output, more_data...));
+}
+template<typename... Data> static bool WriteOkay(bool &Okay, FileFd &output, Data&&... data)
+{
+ Okay = likely(Okay && WriteOkay_fn(output, std::forward<Data>(data)...));
+ return Okay;
+}
+template<typename... Data> static bool WriteOkay(FileFd &output, Data&&... data)
+{
+ bool Okay = likely(output.Failed() == false);
+ return WriteOkay(Okay, output, std::forward<Data>(data)...);
+}
+ /*}}}*/