Set the output write mode: default, overwrite, or append.

@param mode the output write mode
@return this for method chaining
187479
public TransformTask setWriteMode(Target.WriteMode mode) {
    Preconditions.checkArgument(mode != Target.WriteMode.CHECKPOINT,
        "Checkpoint is not an allowed write mode");
    this.mode = mode;
    return this;
  }
185118
@SuppressWarnings("static-method")
	protected OutputConfiguration createStandardOutputConfiguration() {
		final OutputConfiguration defaultOutput = new OutputConfiguration(IFileSystemAccess.DEFAULT_OUTPUT);
		defaultOutput.setDescription(Messages.SarlOutputConfigurationProvider_0);
		defaultOutput.setOutputDirectory(SARLConfig.FOLDER_SOURCE_GENERATED);
		defaultOutput.setOverrideExistingResources(true);
		defaultOutput.setCreateOutputDirectory(true);
		defaultOutput.setCanClearOutputDirectory(false);
		defaultOutput.setCleanUpDerivedResources(true);
		defaultOutput.setSetDerivedProperty(true);
		defaultOutput.setKeepLocalHistory(false);
		return defaultOutput;
	}
312825
private void ensureCommentMode() throws IOException {
    switch (this.mode) {
      case MODE_START_LINE:
        writeIndent();
        this.prevLineCommentsStartPosition = this.linePosition;
        this.write(this.prefixComment);
        changeMode(MODE_COMMENTS);
        break;
      case MODE_VALUES: {
        this.prevLineCommentsStartPosition = this.linePosition;
        this.write(this.prefixComment);
        changeMode(MODE_COMMENTS);
      }
      break;
      case MODE_COMMENTS: {
        BR();
        writeIndent();
        while (this.linePosition < this.prevLineCommentsStartPosition) {
          this.write(' ');
        }
        this.write(this.prefixComment);
      }
      break;
      default:
        throw new Error("Unexpected state");
    }
  }
648053
public void setMode(EditorMode mode) {

        switch (mode) {
            case galleries:
                m_newGalleryMenuButton.getElement().getStyle().clearDisplay();
                m_newMenuButton.getElement().getStyle().setDisplay(Display.NONE);
                break;
            case modelpages:
            case categories:
                m_newGalleryMenuButton.getElement().getStyle().setDisplay(Display.NONE);
                m_newMenuButton.getElement().getStyle().clearDisplay();
                break;
            default:
                m_newMenuButton.getElement().getStyle().clearDisplay();
                m_newGalleryMenuButton.getElement().getStyle().setDisplay(Display.NONE);
                break;
        }
    }
853863
final protected function setWriteMode($mode)
    {
        if (!in_array($mode, [static::WRITE_MODE_INSERT, static::WRITE_MODE_UPSERT, static::WRITE_MODE_UPDATE])) {
            throw new \InvalidArgumentException(sprintf('Passed write mode "%s" is invalid!', $mode));
        }
        $this->writeMode = $mode;
    }
863963
public Processor setOutputDir(final File output) {
        if (!output.isAbsolute()) {
            throw new IllegalArgumentException("Output directory path must be absolute: " + output);
        }
        if (output.exists() && !output.isDirectory()) {
            throw new IllegalArgumentException("Output directory exists and is not a directory: " + output);
        }
        args.put("output.dir", output.getAbsolutePath());
        return this;
    }
92426
public void setMode(String mode) {
        checkNotNull(mode, "mode should not be null");
        if (MODE_ASYNC.equals(mode) || MODE_SYNC.equals(mode)) {
            this.mode = mode;
        } else {
            throw new IllegalArgumentException("illegal mode: " + mode);
        }
    }
1157456
@Override
    public FileIO setAppend(final boolean... append) {
        this.append = (append != null) && ((append.length == 0) || ((append.length > 0) && append[0]));
        return this;
    }
582516
public static void newLine(DebugMode mode){
		if(debugMode == DebugMode.SILENT)
			return;
		if(mode.ordinal() >= debugMode.ordinal()){
			if(outputMode == OutputMode.SYSOUT){
				printStream.println();
			} else if(outputMode == OutputMode.FILE){
				try {
					fileWriter.newLine();
				} catch (IOException e) {
					printStream.println("Cannot write output to file: I/O Exception");
				}
			}
		}
	}
1051196
public void setMode(final TabMode mode) {
		getOrCreateComponentModel().mode = TabMode.SERVER.equals(mode) ? TabMode.DYNAMIC : mode;
	}
266702
public void write(Bean bean, Appendable output) throws IOException {
        JodaBeanUtils.notNull(bean, "bean");
        JodaBeanUtils.notNull(output, "output");
        this.output = new JsonOutput(output, settings.getIndent(), settings.getNewLine());
        writeBean(bean, bean.getClass());
        output.append(settings.getNewLine());
    }
781466
public STTYModeSwitcher setSTTYMode(STTYMode mode) {
        try {
            return new STTYModeSwitcher(mode, runtime);
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }
1320878
private final function setReadableWritable(string $mode)
   {
      if (self::MODE_R === $mode) {
          $this->meta["readable"] = true;
          $this->meta["writable"] = false;
      } else if (self::MODE_W === $mode
              || self::MODE_A === $mode
              || self::MODE_C === $mode
              || self::MODE_X === $mode) {
          $this->meta["readable"] = false;
          $this->meta["writable"] = true;
      } else if (self::MODE_R_MORE === $mode
              || self::MODE_W_MORE === $mode    
              || self::MODE_A_MORE === $mode
              || self::MODE_C_MORE === $mode
              || self::MODE_X_MORE === $mode) {
          $this->meta["readable"] = true;
          $this->meta["writable"] = true;
       }
   }
252496
public void setDialogPublishSiblings(String mode) {

        boolean publishSiblings = false;
        if (mode.equalsIgnoreCase(PUBLISHMODE_SIBLINGS)) {
            publishSiblings = true;
        }
        setDialogPublishSiblings(publishSiblings);
    }
1348282
public XmlObjectSerializer setOutput(SerializerContext serializerContext, Writer out) throws SerializerException, IOException
	{
		try
		{
			serializerContext.serializer.setOutput(out);
		}
		catch (IllegalArgumentException e)
		{
			throw new SerializerException("can't configure serializer", e);
		}
		catch (IllegalStateException e)
		{
			throw new SerializerException("can't configure serializer", e);
		}
		return this;
	}
977067
public function write($content, $mode = self::MODE_REPLACE)
    {
        $fileContent = $this->read();
        switch ($mode) {
            case self::MODE_PREPEND:
                $fileContent = $content . PHP_EOL . $fileContent;
                break;

            case self::MODE_APPEND:
                $fileContent .= PHP_EOL . $content;
                break;

            case self::MODE_REPLACE:
            default:
                $fileContent = $content;
        }

        $result = file_put_contents(
            $this->details->getRealPath(),
            $fileContent
        );

        return $result !== false;
    }
831354
public final void setIconTintMode(@NonNull final PorterDuff.Mode mode) {
        Condition.INSTANCE.ensureNotNull(mode, "The icon tint mode may not be null");
        this.tintMode = mode;
        adaptIconTint();
    }