Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## org.gradle.process
[Java] Interface ProcessForkOptions

    public interface ProcessForkOptions

Specifies the options to use to fork a process.

Method Summary
`ProcessForkOptions` | `copyTo(ProcessForkOptions options)` Copies these options to the given target options.
`ProcessForkOptions` | `environment(java.util.Map environmentVariables)` Adds some environment variables to the environment for this process.
`ProcessForkOptions` | `environment(java.lang.String name, java.lang.Object value)` Adds an environment variable to the environment for this process.
`ProcessForkOptions` | `executable(java.lang.Object executable)` Sets the name of the executable to use.
`java.util.Map` | `getEnvironment()` The environment variables to use for the process.
`java.lang.String` | `getExecutable()` Returns the name of the executable to use.
`java.io.File` | `getWorkingDir()` Returns the working directory for the process.
`void` | `setEnvironment(java.util.Map environmentVariables)` Sets the environment variable to use for the process.
`void` | `setExecutable(java.lang.Object executable)` Sets the name of the executable to use.
`void` | `setWorkingDir(java.lang.Object dir)` Sets the working directory for the process.
`ProcessForkOptions` | `workingDir(java.lang.Object dir)` Sets the working directory for the process.

Method Detail

### copyTo

    public ProcessForkOptions copyTo(ProcessForkOptions options)

  Copies these options to the given target options.
  Parameters:
    `options` - The target options
  Returns:
    this

### environment

    public ProcessForkOptions environment(java.util.Map environmentVariables)

  Adds some environment variables to the environment for this process.
  Parameters:
    `environmentVariables` - The environment variables. Must not be null.
  Returns:
    this

### environment

    public ProcessForkOptions environment(java.lang.String name, java.lang.Object value)

  Adds an environment variable to the environment for this process.
  Parameters:
    `name` - The name of the variable.
    `value` - The value for the variable. Must not be null.
  Returns:
    this

### executable

    public ProcessForkOptions executable(java.lang.Object executable)

  Sets the name of the executable to use.
  Parameters:
    `executable` - The executable. Must not be null.
  Returns:
    this

### getEnvironment

    public java.util.Map getEnvironment()

  The environment variables to use for the process. Defaults to the environment of this process.
  Returns:
    The environment. Returns an empty map when there are no environment variables.

### getExecutable

    public java.lang.String getExecutable()

  Returns the name of the executable to use.
  Returns:
    The executable.

### getWorkingDir

    public java.io.File getWorkingDir()

  Returns the working directory for the process. Defaults to the project directory.
  Returns:
    The working directory. Never returns null.

### setEnvironment

    public void setEnvironment(java.util.Map environmentVariables)

  Sets the environment variable to use for the process.
  Parameters:
    `environmentVariables` - The environment variables. Must not be null.

### setExecutable

    public void setExecutable(java.lang.Object executable)

  Sets the name of the executable to use.
  Parameters:
    `executable` - The executable. Must not be null.

### setWorkingDir

    public void setWorkingDir(java.lang.Object dir)

  Sets the working directory for the process. The supplied argument is evaluated as for Project.file.
  Parameters:
    `dir` - The working directory. Must not be null.

### workingDir

    public ProcessForkOptions workingDir(java.lang.Object dir)

  Sets the working directory for the process. The supplied argument is evaluated as for Project.file.
  Parameters:
    `dir` - The working directory. Must not be null.
  Returns:
    this

Groovy Documentation