For two lists of files, check if any file in the
        second list is newer than any file of the first.
199128
def dependencies_are_newer(self, files, dependencies):
        
        dependency_mtimes = [
            os.path.getmtime(filename) for filename in dependencies]
        file_mtimes = [os.path.getmtime(filename) for filename in files]
        result = False
        for file_mtime in file_mtimes:
            for dependency_mtime in dependency_mtimes:
                if dependency_mtime > file_mtime:
                    result = True
        return result
157258
function(file1, file2) {
		var self  = this,
			type  = self.sortType,
			asc   = self.sortOrder == 'asc',
			stick = self.sortStickFolders,
			rules = self.sortRules,
			sort  = rules[type],
			d1    = file1.mime == 'directory',
			d2    = file2.mime == 'directory',
			res;
			
		if (stick) {
			if (d1 && !d2) {
				return -1;
			} else if (!d1 && d2) {
				return 1;
			}
		}
		
		res = asc ? sort(file1, file2) : sort(file2, file1);
		
		return type !== 'name' && res === 0
			? res = asc ? rules.name(file1, file2) : rules.name(file2, file1)
			: res;
	}
406172
def checkdiff(a,b,sp=True):
  ''
  if sp: a=splitpreserve(a); b=splitpreserve(b)
  res=applydiff(a,rediff(a,b))
  if sp: res=''.join(res)
  return res
1068487
def is_newer_than(pth1, pth2):
    

    return not os.path.exists(pth1) or not os.path.exists(pth2) or \
       os.stat(pth1).st_mtime > os.stat(pth2).st_mtime
737343
function isExist(filename) {
    try {
        fs.accessSync(filename, fs.R_OK);
        return true;
    } catch (e) {
        return false;
    }
}
94417
public function compareFiles($file1, $file2)
    {
        if ($file1 == $file2) {
            return 0;
        }

        $sortOrder = $this->getFileSortOrder();

        if (!isset($sortOrder[$file1]) && !isset($sortOrder[$file2])) {
            return 0;
        }

        if (isset($sortOrder[$file1]) && !isset($sortOrder[$file2])) {
            return -1;
        }

        if (!isset($sortOrder[$file1]) && isset($sortOrder[$file2])) {
            return 1;
        }

        if ($sortOrder[$file1] < $sortOrder[$file2]) {
            return -1;
        }

        if ($sortOrder[$file1] > $sortOrder[$file2]) {
            return 1;
        }

        return 0;
    }
511372
def extend_unique(list1, list2):
    """"""
    for item in list2:
        if item not in list1:
            list1.append(item)
1147609
def _compare_file(self, local, remote):
        """"""
        assert isinstance(local, FileEntry) and isinstance(remote, FileEntry)

        if not local or not remote:
            write("    Files cannot be compared ({} != {}).".format(local, remote))
            return False
        elif local.size != remote.size:
            write(
                "    Files are different (size {:,d} != {:,d}).".format(
                    local.size, remote.size
                )
            )
            return False

        with local.target.open_readable(
            local.name
        ) as fp_src, remote.target.open_readable(remote.name) as fp_dest:
            res, ofs = byte_compare(fp_src, fp_dest)

        if not res:
            write("    Files are different at offset {:,d}.".format(ofs))
        else:
            write("    Files are equal.")
        return res
854788
def has_changed (filename):
    """"""
    key = os.path.abspath(filename)
    mtime = get_mtime(key)
    if key not in _mtime_cache:
        _mtime_cache[key] = mtime
        return True
    return mtime > _mtime_cache[key]
829422
def _check_if_all_updated(self):
        """"""
        for g in self.toc.toc:
            if g not in self.values:
                return False
            for n in self.toc.toc[g]:
                if n not in self.values[g]:
                    return False

        return True
87910
def _compare_across(collections, key):
    """"""
    if len(collections) < 2:
        return True
    c0 = key(collections[0])
    return all(c0 == key(c) for c in collections[1:])
994783
def _HasFile(self, file_name):
    """"""
    if self._zip:
      return file_name in self._zip.namelist()
    else:
      file_path = os.path.join(self._path, file_name)
      return os.path.exists(file_path) and os.path.isfile(file_path)
1205874
protected function checkIfFoldersExist() {
        $arrFilePath = explode(DIRECTORY_SEPARATOR, $this->filePath);
        array_pop($arrFilePath); //Remove filename
        if (count($arrFilePath) > 0) {
            $folderPath = implode(DIRECTORY_SEPARATOR, $arrFilePath);
            $folder = new Folder();
            $folder->createFolderIfNotExists($folderPath);
        }
    }
269743
def compare_trees(dir1, dir2):
    """"""
    paths1 = DirPaths(dir1).walk()
    paths2 = DirPaths(dir2).walk()
    return unique_venn(paths1, paths2)
1052122
def allFileExists(fileList):
    
    allExists = True
    for fileName in fileList:
        allExists = allExists and os.path.isfile(fileName)
    return allExists
190731
public static boolean isFileUpdate(String oldName, String newName) {

        return isFileEqual(new File(oldName), new File(newName));
    }
1146128
def compare_disks(disk0, disk1, configuration):
    """"""
    with DiskComparator(disk0, disk1) as comparator:
        results = comparator.compare(
            size=configuration.get('get_file_size', False),
            identify=configuration.get('identify_files', False),
            concurrent=configuration.get('use_concurrency', False))

        if configuration.get('extract_files', False):
            extract = results['created_files'] + results['modified_files']
            files = comparator.extract(1, extract,
                                       path=configuration['results_folder'])

            results.update(files)

        if configuration.get('compare_registries', False):
            results['registry'] = comparator.compare_registry(
                concurrent=configuration.get('use_concurrency', False))

    return results