Dart API Referencedart:ioProcessOptions

ProcessOptions class

ProcessOptions represents the options that can be supplied when starting a process.

class ProcessOptions {
  /**
   * The working directory from which the process is started.  Note
   * that the change of directory occurs before executing the process
   * on some platforms, which may have impact when using relative
   * paths for the executable and the arguments.
   */
  String workingDirectory;

  /**
   * The encoding used for text on stdout when starting a
   * non-interactive process with [:Process.run:].
   *
   * This option is ignored for interactive processes started with
   * [:Process.start:].
   *
   * The default stdoutEncoding is UTF_8.
   */
  Encoding stdoutEncoding;

  /**
   * The encoding used for text on stderr when starting a
   * non-interactive process with [:Process.run:].
   *
   * This option is ignored for interactive processes started with
   * [:Process.start:].
   *
   * The default stderrEncoding is UTF_8.
   */
  Encoding stderrEncoding;

  /**
   * Provides the environment variables for the process. If not set
   * the environment of the parent process is inherited.
   *
   * Currently, only ASCII environment variables are supported and
   * errors are likely to occur if an environment variables with
   * code-points outside the ASCII range is passed in.
   */
  Map<String, String> environment;
}

Properties

Map<String, String> environment #

Provides the environment variables for the process. If not set the environment of the parent process is inherited.

Currently, only ASCII environment variables are supported and errors are likely to occur if an environment variables with code-points outside the ASCII range is passed in.

Map<String, String> environment;

Encoding stderrEncoding #

The encoding used for text on stderr when starting a non-interactive process with Process.run.

This option is ignored for interactive processes started with Process.start.

The default stderrEncoding is UTF_8.

Encoding stderrEncoding;

Encoding stdoutEncoding #

The encoding used for text on stdout when starting a non-interactive process with Process.run.

This option is ignored for interactive processes started with Process.start.

The default stdoutEncoding is UTF_8.

Encoding stdoutEncoding;

String workingDirectory #

The working directory from which the process is started. Note that the change of directory occurs before executing the process on some platforms, which may have impact when using relative paths for the executable and the arguments.

String workingDirectory;