startProcess method

Future<Process> startProcess(
  1. List<String> args, {
  2. String? workingDirectory,
  3. ProcessStartMode mode = io.ProcessStartMode.normal,
  4. Map<String, String>? environment,
  5. bool includeParentEnvironment = true,
})

Implementation

Future<io.Process> startProcess(
  List<String> args, {
  String? workingDirectory,
  io.ProcessStartMode mode = io.ProcessStartMode.normal,
  Map<String, String>? environment,
  bool includeParentEnvironment = true,
}) async {
  checkExistsSync();

  if (null != workingDirectory) {
    checkDirectoryExists(workingDirectory, "workingDirectory");
  }

  final process = await io.Process.start(
    executable,
    args,
    runInShell: true,
    workingDirectory: workingDirectory,
    mode: mode,
    environment: environment,
    includeParentEnvironment: includeParentEnvironment,
  );

  return process;
}