Deprecated: Save asset to disk.

 filename - String target

 Returns nothing.
769167
def write_to(filename)
      FileUtils.mkdir_p File.dirname(filename)

      PathUtils.atomic_write(filename) do |f|
        f.write source
      end

      nil
    end
1187944
def saveFile(self, filename):
        
        ret = libxml2mod.xmlSaveFile(filename, self._o)
        return ret
685904
function fileName(file) {
  let prefix = null
  let reference = null

  if (isPathSubDirOf(file, PROJECT_DIR)) {
    // Assets from the target project.
    prefix = []
    reference = PROJECT_DIR
  } else if (isPathSubDirOf(file, TOOLBOX_DIR)) {
    // Assets from the Toolbox.
    prefix = ['__borela__']
    reference = TOOLBOX_DIR
  }

  const RELATIVE = relative(reference, file)
  let nodes = RELATIVE.split(sep)

  if (nodes[0] === 'src')
    nodes.shift()

  if (prefix.length > 0)
    nodes = [...prefix, ...nodes]

  return `${nodes.join('/')}?[sha512:hash:base64:8]`
}
1083307
def SaveAvatarToFile(self, Filename, AvatarId=1):
        
        s = 'USER %s AVATAR %s %s' % (self.Handle, AvatarId, path2unicode(Filename))
        self._Owner._DoCommand('GET %s' % s, s)
1349701
def save(self, filename):
        ''''''
        f = open(filename, mode='w')
        f.write("QGC WPL 110\n")
        for w in self.wpoints:
            if getattr(w, 'comment', None):
                f.write("# %s\n" % w.comment)
            f.write("%u\t%u\t%u\t%u\t%f\t%f\t%f\t%f\t%f\t%f\t%f\t%u\n" % (
                w.seq, w.current, w.frame, w.command,
                w.param1, w.param2, w.param3, w.param4,
                w.x, w.y, w.z, w.autocontinue))
        f.close()
1320911
public function save($string, $size, $color, $bg, $target)
    {
        return (!file_exists($target)) ? file_put_contents("$target", $this->getImgData($string, $size, $color, $bg)) : false;
    }
648545
def save(self, name):
        
        self.finalize()
        with open(name, 'wb+') as f:
            buf = self._fileobj.read()
            while buf:
                f.write(buf)
                buf = self._fileobj.read()
341670
def save(self, path):
        
        (folder, filename) = os.path.split(path)
        (name, extension) = os.path.splitext(filename)

        if not name:
            raise ValueError, "name is required"

        path = os.path.join(folder, name + self.extension)
        f = open(path, "wb")
        f.write(self.contents)
        f.close()

        return path
433802
def save(self, filename):
        
        gz = filename.endswith('.gz')
        ligolw_utils.write_filename(self.outdoc, filename, gz=gz)
605107
def save(self, fname: str):
        
        mx.nd.save(fname, self.source + self.target + self.label)
382391
def save(filename, options = {})
      ps = send(@symbol)
      gs_options = [
        "-dBATCH", "-dNOPAUSE", "-q", "-dTextAlphaBits=4", "-dSAFER",
        "-sOutputFile=#{filename}",
        "-sDEVICE=pnggray"
      ]
      barcode_ps = "#{File.expand_path(File.dirname(__FILE__))}/barcode.ps"
      sub = Subexec.run "gs #{gs_options.join(" ")} #{barcode_ps} -c '#{ps}'"
      raise(GhostScriptError, sub.output) unless sub.exitstatus == 0
      resize_method = (ps =~ /includetext/ ? "-scale" : "-sample")
      im_options = ["-trim"]
      im_options += ["-bordercolor white", "-border 10%"] if options[:border] != false
      im_options << "#{resize_method} #{options[:width]}" if options[:width]
      sub = Subexec.run "mogrify #{im_options.join(' ')} #{filename}"
      raise(ImageMagickError, sub.output) unless sub.exitstatus == 0
      File.open(filename, 'r')
    end
542392
def save_target_classes(self, filename):
    """"""
    with open(filename, 'w') as f:
      for k, v in self._target_classes.items():
        f.write('{0}.png,{1}\n'.format(k, v))
1022049
def save(self, filename=None):
        
        if filename is None:
            filename = self.filename
        with open(filename, 'wb') as f:
            f.write(self.data)
1129974
def save(self, filename):
        ''' 
        '''
        with open(filename, 'w') as outfile:
            json.dump(self.to_json(), outfile)
1204321
def save(title='Save', parent=None, current_name='', folder=None,
         _before_run=None, _before_overwrite=None):
    """"""
    filechooser = gtk.FileChooserDialog(title, parent,
                                        gtk.FILE_CHOOSER_ACTION_SAVE,
                                        (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
                                         gtk.STOCK_SAVE, gtk.RESPONSE_OK))
    if current_name:
        filechooser.set_current_name(current_name)
    filechooser.set_default_response(gtk.RESPONSE_OK)

    if folder:
        filechooser.set_current_folder(folder)

    path = None
    while True:
        if _before_run:
            _before_run(filechooser)
            _before_run = None  # XXX: find better implications
        response = filechooser.run()
        if response != gtk.RESPONSE_OK:
            path = None
            break

        path = filechooser.get_filename()
        if not os.path.exists(path):
            break

        if ask_overwrite(path, parent, _before_run=_before_overwrite):
            break
        _before_overwrite = None  # XXX: same
    _destroy(filechooser)
    return path
433783
def _save_cb(self, w):
        
        format = self.saved_type
        if format is None:
            return self.fv.show_error("Please save an image first.")

        # create filename
        filename = self.w.name.get_text().strip()
        if len(filename) == 0:
            return self.fv.show_error("Please set a name for saving the file")
        self.save_name = filename

        if not filename.lower().endswith('.' + format):
            filename = filename + '.' + format

        # join to path
        path = self.w.folder.get_text().strip()
        if path == '':
            path = filename
        else:
            self.save_path = path
            path = os.path.join(path, filename)

        # copy last saved file
        self.fv.error_wrap(shutil.copyfile, self.tmpname, path)
1120433
def save_to_file(self, fname):
        
        with open(fname, 'w') as f:
            f.write(str(self))