Saves a users file.
@param filename The filename of the file to save.
323214
@CommandArgument
  public void save(
      @OptionArgument("filename") String filename) {

    try {
      PrintStream out = new PrintStream(new FileOutputStream(filename));

      for (User user : users.values()) {
        out.println(user);
      }
    } catch (IOException e) {
      e.printStackTrace();
    }

  }
1296382
def save(self, filename):
		'''  '''

		import json
		f = open(filename, 'w')
		json.dump(self.settings, f, indent = 4)
		f.close()
557646
def _do_save_as(self, filename):
        
        if filename != self.filename:
            self._ensure_filename()
            self._close_if_open()
            shutil.copyfile(self.filename, filename)
            self.__get_conn(filename=filename)
286093
def save(self, filename):
        
        clibrebound.reb_output_binary(byref(self), c_char_p(filename.encode("ascii")))
1229856
def save(self, filename, callback=_noop_callback):
        
        with open(filename, 'wb') as fp:
            self._save(fp, callback)
1269773
public void initFromFile(final String filename) {
		try (final InputStream is = new FileInputStream(filename)) {
			init(is);
		} catch (IOException e) {
			initBackToDefaults();
		}
	}
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()
1187944
def saveFile(self, filename):
        
        ret = libxml2mod.xmlSaveFile(filename, self._o)
        return ret
492468
public void addFile(String filename) {
        synchronized (files) {
            if (!files.contains(filename)) {
                files.add(filename);
            }
        }
    }
1273337
@GwtIncompatible("com.google.io.Files")
  public void save(String filename) throws IOException {
    Files.write(toBytes(), new File(filename));
  }
1240182
@Override
    public synchronized void save() {
        if(areStatsDisabled()){
            return;
        }
        
        if (BulkChange.contains(this))
            return;
        
        /*
         * Note: the userFolder should never be null at this point.
         * The userFolder could be null during User creation with the new storage approach
         * but when this code is called, from token used / removed, the folder exists.
         */
        File userFolder = getUserFolder();
        if (userFolder == null) {
            return;
        }
        
        XmlFile configFile = getConfigFile(userFolder);
        try {
            configFile.write(this);
            SaveableListener.fireOnChange(this, configFile);
        } catch (IOException e) {
            LOGGER.log(Level.WARNING, "Failed to save " + configFile, e);
        }
    }
1173042
def save(self, filename):
        """"""
        with open(filename, 'w') as fp:
            fp.write(str(self))
402505
def save(self, filename):
        

        if filename is None:
            filename = self.filename('.b26s')
        # if len(filename.split('\\\\?\\')) == 1:
        #     filename = '\\\\?\\' + filename
        with open(filename, 'w') as outfile:
            outfile.write(pickle.dumps(self.__dict__))
613524
function save(string $filename=null): bool
  {
    if (!empty($filename)) $this->filename = $filename;

    return ( file_put_contents($this->filename, json_encode($this->confValues,JSON_PRETTY_PRINT))!==false );
  }
1004524
private void load(String filename)
	{
		try
		{
			load(new FileInputStream(filename));
		}
		catch (FileNotFoundException e)
		{
			e.printStackTrace();
		}
	}
1338192
public void save(File file) throws IOException {
        try (FileOutputStream out = new FileOutputStream(file)) {
            save(out);
        }
    }
108264
def _save_file(self, filename, contents):
        """"""
        with open(filename, 'w') as f:
            f.write(contents)