Saves the system and all extensions

        Extensions are saved in separate folders (names based on extension)

        Parameters are passed to the .save methods of the IOSystem and
        Extensions. See parameters description there.
976977
def save_all(self, path, table_format='txt', sep='\t',
                 table_ext=None, float_format='%.12g'):
        

        if type(path) is str:
            path = path.rstrip('\\')
            path = Path(path)

        path.mkdir(parents=True, exist_ok=True)

        self.save(path=path,
                  table_format=table_format,
                  sep=sep,
                  table_ext=table_ext,
                  float_format=float_format)

        for ext, ext_name in zip(self.get_extensions(data=True),
                                 self.get_extensions()):
            ext_path = path / ext_name

            ext.save(path=ext_path,
                     table_format=table_format,
                     sep=sep,
                     table_ext=table_ext,
                     float_format=float_format)
        return self
25246
public function save()
    {
        $filepath = $this->getFilepath();
        $this->validateConfig($this->rules, $this->configData);
        $fileSystem = $this->createNew(FileSystem::class);
        $fileSystem->filePutContents($filepath, json_encode($this->configData, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
    }
924929
boolean saveOptions() {

        //Enable history?
        boolean enabled = ((ComboBoxVersionsBean)m_numberVersions.getValue()).getValue() != CmsFileHistoryApp.NUMBER_VERSIONS_DISABLED;

        //Maximal count of versions for current resources.
        int versions = ((ComboBoxVersionsBean)m_numberVersions.getValue()).getValue();

        //Maximal count of versions for deleted resources.
        int versionsDeleted = versions;

        if (m_mode.getValue().equals(CmsFileHistoryApp.MODE_DISABLED)) {
            versionsDeleted = 0;
        }
        if (m_mode.getValue().equals(CmsFileHistoryApp.MODE_WITHOUTVERSIONS)) {
            versionsDeleted = 1;
        }

        if (m_mode.getValue().equals(CmsFileHistoryApp.MODE_WITHVERSIONS)
            && (versions == CmsFileHistoryApp.NUMBER_VERSIONS_DISABLED)) {
            return false;
        }
        OpenCms.getSystemInfo().setVersionHistorySettings(enabled, versions, versionsDeleted);
        OpenCms.writeConfiguration(CmsSystemConfiguration.class);

        return true;
    }
493531
def save(self, *args, **kwargs):
        
        if 'node' not in self.shortcuts:
            self.shortcuts['node'] = self.device.node

        if 'user' not in self.shortcuts and self.device.node.user:
            self.shortcuts['user'] = self.device.node.user

        if 'layer' not in self.shortcuts and 'nodeshot.core.layers' in settings.INSTALLED_APPS:
            self.shortcuts['layer'] = self.device.node.layer

        super(Interface, self).save(*args, **kwargs)
231740
def save(self, filename):
        
        dirname = os.path.dirname(filename)
        if not os.path.exists(dirname):
            os.makedirs(dirname)
        
        projex.text.xmlindent(self._xroot)
        xtree = ElementTree.ElementTree(self._xroot)
        xtree.write(filename, encoding=self.encoding(), xml_declaration=True)
        return True
1090216
function init_extensions()
	{
		$filename = $this->froot.'cfg/extensions.php';
		if (is_file($filename))
		{
			include_once($filename);
		}

		$this->extensions = new EresusExtensions();
	}
1063997
def add_extension(self, extension):
        
        if extension:
            extension_to_add = os.path.abspath(os.path.expanduser(extension))
            if os.path.exists(extension_to_add):
                self._extension_files.append(extension_to_add)
            else:
                raise IOError("Path to the extension doesn't exist")
        else:
            raise ValueError("argument can not be null")
1229100
public function save()
    {
        if (!$this->isValidPostSave()) {
            return;
        }

        // Get the options
        global $modularityOptions;
        $modularityOptions = (isset($_POST['modularity-options'])) ? $_POST['modularity-options'] : array();

        // Update the options
        update_option($this->slug, $modularityOptions);

        do_action('Modularity/Options/Save');

        // All done, send notice
        $this->notice(__('Options saved successfully', 'modularity'), ['updated']);
    }
180760
def save(self, filename):
        
        file_root, file_ext = os.path.splitext(filename)
        if file_ext == '.npy':
            np.save(filename, self._data)
        elif file_ext == '.npz':
            np.savez_compressed(filename, self._data)
        else:
            raise ValueError('Extension %s not supported for point saves.' %(file_ext))
990337
def save(self, filename, wildcard='*', verbose=False):
        ''''''
        f = open(filename, mode='w')
        k = list(self.keys())
        k.sort()
        count = 0
        for p in k:
            if p and fnmatch.fnmatch(str(p).upper(), wildcard.upper()):
                f.write("%-16.16s %f\n" % (p, self.__getitem__(p)))
                count += 1
        f.close()
        if verbose:
            print("Saved %u parameters to %s" % (count, filename))
65562
def load_extensions_from_config(**config):
    
    extensions = []
    if 'EXTENSIONS' in config:
        for ext in config['EXTENSIONS']:
            try:
                extensions.append(locate(ext))
            except Exception as e:
                print(e)
    return extensions
191484
def save_gui_settings(self, *a):
        
        
        # only if we're supposed to!
        if self._autosettings_path:

            # Get the gui settings directory
            gui_settings_dir = _os.path.join(_cwd, 'egg_settings')

            # make sure the directory exists
            if not _os.path.exists(gui_settings_dir): _os.mkdir(gui_settings_dir)

            # make a path with a sub-directory
            path = _os.path.join(gui_settings_dir, self._autosettings_path)
            
            # for saving header info
            d = _d.databox()

            # add all the controls settings
            for x in self._autosettings_controls: self._store_gui_setting(d, x)

            # save the file
            d.save_file(path, force_overwrite=True)
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
625512
def save(self, path="speech"):
        
        if self._data is None:
            raise Exception("There's nothing to save")

        extension = "." + self.__params["format"]
        if os.path.splitext(path)[1] != extension:
            path += extension

        with open(path, "wb") as f:
            for d in self._data:
                f.write(d)

        return path
488819
public void saveSystem() {
		int resp = chooser.showSaveDialog(this);
		if (resp == JFileChooser.APPROVE_OPTION) {
			File file = chooser.getSelectedFile();
			if (!file.getName().endsWith(".xml")) {
				file = new File(file.getAbsolutePath()+".xml");
			}
			
			try {
				ParticleIO.saveConfiguredSystem(file, game.getSystem());
			} catch (IOException e) {
				Log.error(e);
				JOptionPane.showMessageDialog(this, e.getMessage());
			}
		}
	}
828268
public void addExtension(Object extension) {
        if (extension == null)
            return;
        if (_extensions == null)
            _extensions = new ArrayList<>();
        _extensions.add(extension);
    }
522135
def modifyExtensions(self,
                         extensionObjects=[]):
        

        if len(extensionObjects) > 0 and \
           isinstance(extensionObjects[0], Extension):
            self._extensions = extensionObjects
            res = self.edit(str(self))
            self._json = None
            self.__init()
            return res