4 ms·
I'm not a fan of the CopyFile solution suggested. Often one parameter is distinguished by whether it could be an array. The Unix cat utility takes multiple sou
by tlb 7y ago
I'm not a fan of the CopyFile solution suggested.
Often one parameter is distinguished by whether it could be an array. The Unix cat utility takes multiple sources to a single destination, so analogously:
bool cat_files_to_file(string dst, vector<string> srcs)
and it'll be obvious in the call site what's going on:
cat_files_to_file("/tmp/backup", {"presentation.md"});
and your function can also concatenate files.