getPath static method

List<String> getPath()

Get the current PATH as a list of directories.

Implementation

static List<String> getPath() {
  final pathVar = Platform.environment['PATH'] ?? '';
  final sep = Platform.isWindows ? ';' : ':';
  return pathVar.split(sep).where((p) => p.isNotEmpty).toList();
}