Writes the contents of the specified file entry to its destination path.
507243
def write(write_entry: FILE_WRITE_ENTRY):
    
    output_path = environ.paths.clean(write_entry.path)
    make_output_directory(output_path)
    writer.write_file(output_path, write_entry.contents)
724376
def file_put_contents(path, data):
    
    with open(path, 'w') as f:
        f.write(data); f.flush()
519107
def write_data(self, data):
        
        with open(self.path, "w") as writer:
            writer.write(data)
902403
public static void writeSymbolToFileEntries(final Iterable<Map.Entry<Symbol, File>> entries,
      final CharSink sink) throws IOException {

    writeUnixLines(
        transform(
            MapUtils.transformValues(entries, toAbsolutePathFunction()),
            TO_TAB_SEPARATED_ENTRY),
        sink);
  }
197664
def write(dest)
      path = destination(dest)
      FileUtils.mkdir_p(File.dirname(path))
      File.write(path, output, :mode => "wb")

      trigger_hooks(:post_write)
    end
349559
def __write(self, thePath, theData):
            
        fd = open(thePath, "wb")
        fd.write(theData)
        fd.close()
192707
def write_files(template, destination='./dxf'):
    
    os.makedirs(destination)
    for key, value in template.items():
        with open(os.path.join(destination, key), 'w') as f:
            f.write(replace_whitespace(value, insert=False))
563759
def _write_to_filepath(content, output):
    
    outdir = os.path.dirname(output)
    if outdir and not os.path.exists(outdir):
        os.makedirs(outdir)

    with anytemplate.compat.copen(output, 'w') as out:
        out.write(content)
359935
public function writeContent()
    {
        $dirPath = dirname($this->getPath());

        if (!is_dir($dirPath)) {
            mkdir($dirPath, 0755, true);
        }

        file_put_contents(
            $this->getPath(),
            $this->getContent()
        );
    }
412357
public static void writeStringToFile(String path, String toWrite, JavaSparkContext sc) throws IOException {
        writeStringToFile(path, toWrite, sc.sc());
    }
96081
def write(self, path):
        """"""
        with codecs.open(path, 'w', encoding='utf-8') as f:
            f.write(self.text)
439785
def write(content)
      handle = File.open(@path, 'w')

      handle.write(content)
      handle.close
    end
757308
function write(filepath, contents) {
  return mkdirp(path.dirname(filepath)).then(() => {
    return writeFile(filepath, contents);
  });
}
226205
function writeFile(path, contents, mode, cb) {
    fs.writeFile(path, contents, {mode: mode || 0666, encoding: 'utf8'}, function (err) {
        if (err) { throw err; }
        console.info(cliStyles.cyan + '\tcreate' + cliStyles.reset + ': ' + path);
        cb();
    });
}
43244
def write_file(path, content, mode=None, encoding='utf-8'):
    '''  '''
    if not mode:
        if isinstance(content, bytes):
            mode = 'wb'
        else:
            mode = 'wt'
    if not path:
        raise ValueError("Output path is invalid")
    else:
        getLogger().debug("Writing content to {}".format(path))
        # convert content to string when writing text data
        if mode in ('w', 'wt') and not isinstance(content, str):
            content = to_string(content)
        elif mode == 'wb':
            # content needs to be encoded as bytes
            if not isinstance(content, str):
                content = to_string(content).encode(encoding)
            else:
                content = content.encode(encoding)
        if str(path).endswith('.gz'):
            with gzip.open(path, mode) as outfile:
                outfile.write(content)
        else:
            with open(path, mode=mode) as outfile:
                outfile.write(content)
642561
def write_file(name, contents)
      path = File.join(Billy.config.certs_path, name)
      FileUtils.mkdir_p(File.dirname(path))
      File.write(path, contents)
      path
    end
1142764
public static void writeStringToFile(String path, String toWrite, Configuration hadoopConfig) throws IOException {
        FileSystem fileSystem = FileSystem.get(hadoopConfig);
        try (BufferedOutputStream bos = new BufferedOutputStream(fileSystem.create(new Path(path)))) {
            bos.write(toWrite.getBytes("UTF-8"));
        }
    }