prependToPath function
path with directory in front, using the platform's separator.
Implementation
String prependToPath(String directory, String? path, {bool? windows}) {
final separator = (windows ?? Platform.isWindows) ? ';' : ':';
return path == null || path.isEmpty ? directory : '$directory$separator$path';
}