joinPaths static method
joins a collection of Paths appropriately for the PATH environment variable.
Implementation
static String joinPaths(Iterable<String> paths) {
StringBuffer buf = StringBuffer();
bool canAddToEnd = false;
for (var path in paths) {
if (canAddToEnd) {
buf.write(envVarPathSeparator);
}
canAddToEnd = true;
buf.write(path);
}
return buf.toString();
}