* For example: *
* Default is {@code TRUE} * * @param failOnExit The fail on exit toggle * @return this operation instance. */ public ExecOperation failOnExit(boolean failOnExit) { failOnExit_ = failOnExit; return this; } /** * Configures an Exec operation from a {@link BaseProject}. * * @param project the project * @return this operation instance */ public ExecOperation fromProject(BaseProject project) { project_ = project; return this; } /** * Returns whether the operation should fail if the command exit value/status is not 0. * * @return {@code true} or {@code false} */ public boolean isFailOnExit() { return failOnExit_; } /** * Configure the command timeout. * * @param timeout The timeout in seconds * @return this operation instance */ public ExecOperation timeout(int timeout) { timeout_ = timeout; return this; } /** * Returns the command timeout. * * @return the timeout */ public int timeout() { return timeout_; } /** * Configures the working directory. * * @param dir the directory * @return this operation instance */ public ExecOperation workDir(File dir) { workDir_ = dir; return this; } /** * Configures the working directory. * * @param dir the directory * @return this operation instance */ public ExecOperation workDir(Path dir) { return workDir(dir.toFile()); } /** * Configures the working directory. * * @param dir the directory path * @return this operation instance */ public ExecOperation workDir(String dir) { return workDir(new File(dir)); } /** * Returns the working directory. * * @return the directory */ public File workDir() { return workDir_; } }