Called on file(s) modifications
346806
def run_on_changes(paths)
      if paths.any? { |path| path.match(%r{^db/migrate/(\d+).+\.rb}) } || reset?
        migrations = paths.map { |path| Migration.new(path) }
        migrate(migrations)
      elsif paths.any? { |path| path.match(%r{^db/seeds\.rb$}) }
        seed_only
      end
    end
753373
def changed_files(cls, scm, changes_since=None, diffspec=None):
    """"""
    workspace = ScmWorkspace(scm)
    if diffspec:
      return workspace.changes_in(diffspec)

    changes_since = changes_since or scm.current_rev_identifier()
    return workspace.touched_files(changes_since)
966183
def replace_if_changed(localfile, jottapath, JFS):
    """"""
    jf = JFS.getObject(jottapath)
    lf_hash = getxattrhash(localfile) # try to read previous hash, stored in xattr
    if lf_hash is None:               # no valid hash found in xattr,
        with open(localfile) as lf:
            lf_hash = calculate_md5(lf) # (re)calculate it
    if type(jf) == JFSIncompleteFile:
        log.debug("Local file %s is incompletely uploaded, continue", localfile)
        return resume(localfile, jf, JFS)
    elif jf.md5 == lf_hash: # hashes are the same
        log.debug("hash match (%s), file contents haven't changed", lf_hash)
        setxattrhash(localfile, lf_hash)
        return jf         # return the version from jottaclouds
    else:
        setxattrhash(localfile, lf_hash)
        return new(localfile, jottapath, JFS)
755086
private void determineChangesSince(File file, long lastScanTime) {
		try {
			if (GlobalConfiguration.verboseMode && log.isLoggable(Level.INFO)) {
				log.info("Firing file changed event " + file);
			}
			listener.fileChanged(file);
			if (file.isDirectory()) {
				File[] filesOfInterest = file.listFiles(new RecentChangeFilter(lastScanTime));
				for (File f : filesOfInterest) {
					if (f.isDirectory()) {
						determineChangesSince(f, lastScanTime);
					}
					else {
						if (GlobalConfiguration.verboseMode && log.isLoggable(Level.INFO)) {
							log.info("Observed last modification time change for " + f + "  (lastScanTime="
									+ lastScanTime + ")");
							log.info("Firing file changed event " + file);
						}
						listener.fileChanged(f);
					}
				}
			}
		}
		catch (Throwable t) {
			if (log.isLoggable(Level.SEVERE)) {
				log.log(Level.SEVERE, "FileWatcher caught serious error, see cause", t);
			}
		}
	}
925916
private function appendCollectedFileAndChanges(): void
    {
        if (!empty($this->currentFile)) {
            foreach ($this->currentChanges as $change) {
                $this->currentFile->addChange($change);
            }
            $this->files[] = $this->currentFile;
        }
        $this->currentChanges = [];
    }
1129896
def merge_modified_section_data(self):
        """"""
        
        for section in self.sections:
            section_data_start = adjust_FileAlignment( section.PointerToRawData,
                self.OPTIONAL_HEADER.FileAlignment )
            section_data_end = section_data_start+section.SizeOfRawData
            if section_data_start < len(self.__data__) and section_data_end < len(self.__data__):
                self.__data__ = self.__data__[:section_data_start] + section.get_data() + self.__data__[section_data_end:]
242159
def changed(self, src, path, dest):
        """"""
        modified = {path: self.parents[path].updated}

        while True:
            for path in modified:
                if self.parents[path]:
                    mtime = modified.pop(path)
                    for parent in self.parents[path]:
                        modified[parent] = max(mtime,
                                               self.parents[parent].updated)
                    break
            else:
                break

        for path in modified:
            self._build(src, path, dest, modified[path])
185642
def update_version_file(version)
      if File.exists?('VERSION')
        File.open('VERSION', 'w') { |f| f << version.to_s }
        modified_files << 'VERSION'
      end
    end
697091
function filesChanged(fileList) {
        if (FindUtils.isNodeSearchDisabled() || !fileList || fileList.length === 0) {
            return;
        }
        var updateObject = {
            "fileList": fileList
        };
        if (searchModel.filter) {
            updateObject.filesInSearchScope = FileFilters.getPathsMatchingFilter(searchModel.filter, fileList);
            _searchScopeChanged();
        }
        searchDomain.exec("filesChanged", updateObject);
    }
639919
def refresh():
    """"""
    override_files = []
    for stack in traceback.extract_stack():
        f = os.path.join(os.path.dirname(stack[0]), OVERRIDE_FILE)
        if f not in override_files:
            override_files.insert(0, f)
    if OVERRIDE_FILE in override_files:
        del override_files[override_files.index(OVERRIDE_FILE)]
    override_files.append(OVERRIDE_FILE)

    def import_path(path):
        if sys.version_info < (3, 5, 0):
            from importlib.machinery import SourceFileLoader
            return SourceFileLoader(__name__, path).load_module()
        import importlib.util
        spec = importlib.util.spec_from_file_location(__name__, path)
        module = importlib.util.module_from_spec(spec)
        spec.loader.exec_module(module)
        return module

    for override_file in override_files:
        if not os.path.isfile(override_file):
            continue
        mod = import_path(override_file)
        globals().update({n: getattr(mod, n) for n in dir(mod) if not n.startswith("__")})
338751
def refresh_file_dependent_actions(self):
        """"""
        if self.dockwidget and self.dockwidget.isVisible():
            enable = self.get_current_editor() is not None
            for action in self.file_dependent_actions:
                action.setEnabled(enable)
423689
def modified(filename):
    '''
    
    '''
    if isinstance(filename, file):
        filename = filename.name

    return duration(os.stat(filename)[stat.ST_MTIME])
230390
def run_on_modifications(paths)
      if paths.include? 'all'
        run_all
      elsif paths.include? 'compile'
        run_maven :compile => true
      else
        run_maven :classes => paths
      end
    end
864315
def on_moved(self, event):
        
        logger.debug("file moved: %s -> %s", event.src_path, event.dest_path)
        if not event.is_directory:
            self.update_file(event.dest_path)
304135
def run_on_modifications(paths)
      changed_files, success = Runner.run(Inspector.clean(paths), watchers, options)

      throw :task_has_failed unless success
    end
813715
def update(self, of):
        """"""

        # The other values should be set when the file object is created with dataset.bsfile()
        for p in ('mime_type', 'preference', 'state', 'hash', 'modified', 'size', 'contents', 'source_hash', 'data'):
            setattr(self, p, getattr(of, p))

        return self
405838
def change(file)
      if file.is_a?(Ichiban::HelperFile) or file.is_a?(Ichiban::ModelFile)
        delete_all
        load_all
        Ichiban.logger.reload(file.abs)
      end
    end