@param [String] path


 Writes the specified content to the current file. Existing files are
 overwritten.

 @param [String] content
439785
def write(content)
      handle = File.open(@path, 'w')

      handle.write(content)
      handle.close
    end
12855
public void writeToFile(StringBuffer content, String filename, String encoding) throws NoSuchPathException, IOException{
		try {
			OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(filename), encoding);
			writer.write(content.toString(), 0, content.length());
			writer.flush();
			writer.close();
		} catch (FileNotFoundException e) {
			throw new NoSuchPathException(e);
		}
	}
1185980
def WriteFileHash(self, path, hash_value):
    
    string = '{0:s}\t{1:s}\n'.format(hash_value, path)

    encoded_string = self._EncodeString(string)
    self._file_object.write(encoded_string)
1215690
def save(self, content):
        
        # backup existing file if needed
        if os.path.exists(self.file_path) and not self.assume_yes:
            message = "Overwrite existing {}? (y/n) "
            if not confirm(message.format(self.filename)):
                self.backup()

        # write file
        self.output("Saving " + self.filename)
        with open(self.file_path, "wb") as handler:
            if not isinstance(content, bytes):
                content = bytes(content, "utf-8")
            handler.write(content)
        self.yeah("Done!")
1057700
def file_append(filepath, newcontent, backup=false)
      content = StringIO.new
      
      if self.file_exists?(filepath)
        self.cp filepath, "#{filepath}-previous" if backup
        content = self.file_download filepath
      end
      
      if newcontent.is_a?(StringIO)
        newcontent.rewind
        content.puts newcontent.read
      else
        content.puts newcontent
      end
      
      self.file_upload content, filepath
    end
149556
public static void writeStringToFile(File file, String content) throws IOException {
        OutputStream outputStream = getOutputStream(file);
        outputStream.write(content.getBytes());
    }
656932
function save(filePath, content) {
    mkpath(PATH.dirname(filePath));
    fs.writeFileSync(filePath, content);
}
1145373
def write_contents
        @contents.each do |relative_filepath, content|
          filepath = DM_STORAGE_PATH.join relative_filepath
          filedir  = filepath.dirname
          filedir.mkpath     unless (filedir.directory?)
          permission = 0644
          permission = 0600  if (filepath.basename.to_path == 'id_rsa')
          file = File.open filepath.to_path, ?w, permission
          file.write content
          file.close
        end
      end
64170
public void write(String filename, String content) throws IOException {
    FSDataOutputStream s = getMfs().create(new Path(filename));
    s.writeBytes(content);
    s.close();
  }
533301
function (filepath, content){
        try{
            grunt.file.write(filepath, content);
            grunt.log.writeln('File "' + filepath + '" wrapped and saved.');
        } catch (err){
            grunt.fail.fatal(err);
        }
    }
1169985
def set(path)
      assert_exists
      path = path.to_s

      @object.setValueAttribute path

      unless @object.getContentType
        @object.setContentType(Celerity::Util.content_type_for(path))
      end

      path
    end
1311052
public static void write(Path self, String text) throws IOException {
        Writer writer = null;
        try {
            writer = new OutputStreamWriter(Files.newOutputStream(self), Charset.defaultCharset());
            writer.write(text);
            writer.flush();

            Writer temp = writer;
            writer = null;
            temp.close();
        } finally {
            closeWithWarning(writer);
        }
    }
370348
public function writeContent($content, $overwrite = false)
    {

        if ($overwrite) {
            $fh = fopen($this->getPath(), 'w');
        } else {
            $fh = fopen($this->getPath(), 'w+');
        }
        fwrite($fh, $content);
        fclose($fh);
    }
971357
public final void writeTo(String fmt, String path) throws IOException {
        writeTo(fmt, new File(replaceTildeWithHomeDir(ensureSuffix(path, fmt))));
    }
892936
def WriteFileEntry(self, path):
    
    string = '{0:s}\n'.format(path)

    encoded_string = self._EncodeString(string)
    self._file_object.write(encoded_string)
567840
function writeAppFile(filePath, content) {
  return new Promise((resolve, reject) => {
    const resolvedFilePath = path.join(path.resolve(tmp), 'src', 'app', filePath);
    fs.writeFile(resolvedFilePath, content, (err) => {
      if (err) {
        reject(err);
        return;
      }

      resolve();
    });
  });
}
616619
def write_file(path, data)
      File.open(path, "w+") do |file|
        file.flock(File::LOCK_EX)
        file.write(data)
        file.flock(File::LOCK_UN)
      end

      true
    end