Saves the current modifications to the provided path.
183738
def save(path)
      unless path.kind_of? String
        raise ArgumentError, 'save expects a string path'
      end

      Xcellus::_save(@handle, path)
    end
444053
def persist(self, path_to_file):
        
        with open(path_to_file, 'wb') as f:
            f.write(self.data)
220115
def update_path(self):
        
        if WINDOWS:
            return self.add_to_windows_path()

        # Updating any profile we can on UNIX systems
        export_string = self.get_export_string()

        addition = "\n{}\n".format(export_string)

        updated = []
        profiles = self.get_unix_profiles()
        for profile in profiles:
            if not os.path.exists(profile):
                continue

            with open(profile, "r") as f:
                content = f.read()

            if addition not in content:
                with open(profile, "a") as f:
                    f.write(addition)

                updated.append(os.path.relpath(profile, HOME))
353939
def update(self, path, verbose=False):
        
        if path in self._by_path:
            self.remove(path)
        else:
            self.add(path, verbose)
710914
def save(self):
        
        if not os.path.exists(self.paths.virt()):
            os.makedirs(self.paths.virt())

        self._save_metadata()
        self.virt_env.save()
689050
def in_path(self, new_path, old_path=None):
        """"""
        self.path = new_path
        try:
            yield
        finally:
            self.path = old_path
930854
public void updatePath(String path) {
        if (!path.contains(".") && !path.endsWith("/"))
            path += '/';
        this.path = path(path);
    }
746492
def save_option(self, path, section, option, value):
        
        config = ConfigParser.SafeConfigParser()
        config.read(path)
        if not config.has_section(section):
            config.add_section(section)
        config.set(section, option, value)
        fp = open(path, 'w')
        config.write(fp)
        fp.close()
        if not self.has_section(section):
            self.add_section(section)
        self.set(section, option, value)
981441
def save_file(self):
        """"""

        l = []
        walk = self.walker
        for edit in walk.lines:
            # collect the text already stored in edit widgets
            if edit.original_text.expandtabs() == edit.edit_text:
                l.append(edit.original_text)
            else:
                l.append(re_tab(edit.edit_text))

        # then the rest
        while walk.file is not None:
            l.append(walk.read_next_line())

        # write back to disk
        outfile = open(self.save_name, "w")

        l_iter = iter(l)

        line = next(l_iter)
        prefix = ""

        while True:
            try:
                outfile.write(prefix + line)
                prefix = "\n"
                line = next(l_iter)
            except StopIteration:
                if line != "\n":
                    outfile.write("\n")
                break
43022
def save(self, **kwargs):
        ""
        old_tree_path = self.tree_path
        if self.tree_parent:
            if self.tree_parent.tree_path:
                self.tree_path = '%s/%s' % (self.tree_parent.tree_path, self.slug)
            else:
                self.tree_path = self.slug
        else:
            self.tree_path = ''
        Category.objects.clear_cache()
        super(Category, self).save(**kwargs)
        if old_tree_path != self.tree_path:
            # the tree_path has changed, update children
            children = Category.objects.filter(tree_parent=self)
            for child in children:
                child.save(force_update=True)
1152
def on_modified(self, event):
        """"""
        path = event.src_path
        if path not in self.saw:
            self.saw.add(path)
            self.recompile(path)
918044
def save(self, path):
        
        (folder, filename) = os.path.split(path)
        if not filename:
            filename = _clean_filename(self.name)
            path = os.path.join(folder, filename)
        return self.waveform.save(path)
450548
def _save(self, stateName, path):
        """"""
        print('saving...')

        state = {'session': dict(self.opts),
                 'dialogs': self.dialogs.saveState()}

        self.sigSave.emit(state)
        self.saveThread.prepare(stateName, path, self.tmp_dir_session, state)
        self.saveThread.start()

        self.current_session = stateName

        r = self.opts['recent sessions']
        try:
            # is this session already exists: remove it
            r.pop(r.index(path))
        except ValueError:
            pass
        # add this session at the beginning
        r.insert(0, path)
446467
def update_recent_paths(response, path):
    

    try:
        recent_paths = environ.configs.fetch('recent_paths', [])

        if path in recent_paths:
            recent_paths.remove(path)

        recent_paths.insert(0, path)
        environ.configs.put(recent_paths=recent_paths[:10], persists=True)
        environ.configs.save()
    except Exception as error:  # pragma: no cover
        response.warn(
            code='FAILED_RECENT_UPDATE',
            message='Unable to update recently opened projects',
            error=str(error)
        ).console(whitespace=1)

    return True
435933
function(path) {
		var newProps = route.deparam(path),
			oldProps = route.deparam(getCurrentUrl()),
			method = "pushState",
			changed = {};

		// Adds window.location.hash to path if it's not already in path.
		if (this.keepHash && path.indexOf("#") === -1 && window.location.hash) {
			path += window.location.hash;
		}

		// The old state and new state are diffed 
		// to figure out which keys are changing.
		diffObject(oldProps, newProps)
			.forEach(function(patch) {
				// `patch.key` refers to the mutated property name on `newProps`.
				return changed[patch.key] = true;
			});

		// If any of the changed properties are in `replaceStateKeys` or 
		// `replaceStateOnceKeys` change the method to `'replaceState'`.
		if (this.replaceStateKeys.length) {
			this.replaceStateKeys.forEach(function(replaceKey) {
				if (changed[replaceKey]) {
					method = "replaceState";
				}
			});
		}
		
		if (this.replaceStateOnceKeys.length) {
			this.replaceStateOnceKeys
				.forEach(function(replaceOnceKey, index, thisArray) {
					if (changed[replaceOnceKey]) {
						method = "replaceState";
						// Remove so we don't attempt to replace 
						// the state on this key again.
						thisArray.splice(index, 1);
					}
				});
		}
		window.history[method](null, null, bindingProxy.call("root") + path);
	}
556115
def changeTo(self, path):
        '''
        '''
        dictionary = DictSingle(Pair('PATH', StringSingle(path)))
        self.value = [dictionary]
598458
def saveto(self, path, sortkey = True):
        
        with open(path, 'w') as f:
            self.savetofile(f, sortkey)