Returns True if the first file was modified more recently than the second file (used os.path.getctime)
16950
def isNewer(firstFile, secondFile):
    
    assert os.path.exists(firstFile)
    assert os.path.exists(secondFile)
    return os.path.getctime(firstFile) > os.path.getctime(secondFile)
1098283
def file_uptodate(fname, cmp_fname):
    
    try:
        return (file_exists(fname) and file_exists(cmp_fname) and
                os.path.getmtime(fname) >= os.path.getmtime(cmp_fname))
    except OSError:
        return False
742672
def last_modified_time(path):
    
    return pd.Timestamp(os.path.getmtime(path), unit='s', tz='UTC')
1253673
private static boolean isChanged(byte[] bytes, String filepath) throws IOException {
        return isChanged(bytes, bytes.length,  filepath);
    }
1292194
def is_up_to_date(outfile, basedatetime):
        # type: (AnyStr, datetime) -> bool
        """"""
        if os.path.exists(outfile):
            if os.path.getmtime(outfile) >= basedatetime:
                return True
        return False
625358
@GuardedBy("mLock")
  private boolean maybeUpdateFileCacheSize() {
    long now = mClock.now();
    if ((!mCacheStats.isInitialized()) ||
        mCacheSizeLastUpdateTime == UNINITIALIZED ||
        (now - mCacheSizeLastUpdateTime) > FILECACHE_SIZE_UPDATE_PERIOD_MS) {
      return maybeUpdateFileCacheSizeAndIndex();
    }
    return false;
  }
507372
def was_modified_since_last_sync(self):
        
        info = self.get_sync_info()
        if not info:
            return None
        if self.size != info["s"]:
            return True
        if self.mtime > info["m"]:
            return True
        return False
1222437
private boolean isStale() {
    long lastRun = outputFile.lastModified();
    long sourcesLastModified = Math.max(
        getLastModifiedTime(this.sourceFileLists),
        getLastModifiedTime(this.sourcePaths));
    long externsLastModified = getLastModifiedTime(this.externFileLists);

    return lastRun <= sourcesLastModified || lastRun <= externsLastModified;
  }
606743
def _compare(info1, info2):
    # type: (Info, Info) -> bool
    
    # Check filesize has changed
    if info1.size != info2.size:
        return True
    # Check modified dates
    date1 = info1.modified
    date2 = info2.modified
    return date1 is None or date2 is None or date1 > date2
1294101
def has_file_changed(directory, checksums, filetype='genbank'):
    """"""
    pattern = NgdConfig.get_fileending(filetype)
    filename, expected_checksum = get_name_and_checksum(checksums, pattern)
    full_filename = os.path.join(directory, filename)
    # if file doesn't exist, it has changed
    if not os.path.isfile(full_filename):
        return True

    actual_checksum = md5sum(full_filename)
    return expected_checksum != actual_checksum
1117266
def is_same_time(self):
        """"""
        return (
            self.local
            and self.remote
            and FileEntry._eps_compare(self.local.mtime, self.remote.mtime) == 0
        )
979741
def _HasOOOWrite(self, path):
    """"""
    # Check the sizes of each path before the current one.
    size = tf.io.gfile.stat(path).length
    old_size = self._finalized_sizes.get(path, None)
    if size != old_size:
      if old_size is None:
        logger.error('File %s created after file %s even though it\'s '
                         'lexicographically earlier', path, self._path)
      else:
        logger.error('File %s updated even though the current file is %s',
                         path, self._path)
      return True
    else:
      return False
1364348
def samefile(file1, file2):
    # type: (str, str) -> bool
    """"""
    if hasattr(os.path, 'samefile'):
        return os.path.samefile(file1, file2)
    else:
        path1 = os.path.normcase(os.path.abspath(file1))
        path2 = os.path.normcase(os.path.abspath(file2))
        return path1 == path2
1224741
def changes_found(self):
        
        if self.dest is None:
            warnings.warn("dest directory not found!")
        if self.src is None:
            warnings.warn("src directory not found!")
        if self.src is None or self.dest is None:
            return False
        dest_mtime = -1
        src_mtime = os.path.getmtime(self.src)
        if os.path.exists(self.dest):
            dest_mtime = os.path.getmtime(self.dest)

        if src_mtime >= dest_mtime:
            return True # changes found

        for folder, _, files in os.walk(self.src):
            for filename in fnmatch.filter(files, '*.scss'):
                src_path = os.path.join(folder, filename)
                if os.path.getmtime(src_path) >= dest_mtime:
                    return True 
        return False
1239916
def _enough_time_has_passed(self, FPS):
    ''''''
    if FPS == 0:
      return False
    else:
      earliest_time = self.last_update_time + (1.0 / FPS)
      return time.time() >= earliest_time
355781
def is_remote_file_modified(web_file, destination):
    
    try:
        # check datetime of last modified in file.
        last_mod = web_file.headers.get('last-modified')
        if last_mod:
            web_file_time = time.strptime(
                web_file.headers.get(
                    'last-modified'), '%a, %d %b %Y %H:%M:%S %Z')
        else:
            web_file_time = time.gmtime()

        web_file_size = int(web_file.headers.get('content-length', -1))
        if os.path.exists(destination):
            file_time = time.gmtime(os.path.getmtime(destination))
            file_size = os.path.getsize(destination)
            if file_time >= web_file_time and file_size == web_file_size:
                return False

    except Exception as ex:
        msg = ('Fail checking if remote file is modified default returns TRUE'
               ' - {}'.format(ex))
        logger.debug(msg)

    return True
1127241
boolean checkForChanges()
    {
        // initialize with last checked files
        final Map<File, byte[]> presents = new HashMap<>(fingerprints);
        boolean modified = traverseDirectory(location, new IFileVisitor()
        {
            @Override
            public boolean visitFile(File file)
            {
                return modified(presents.remove(file), file);
            }

            @Override
            public boolean visitDir(File dir)
            {
                return modified(presents.remove(dir), dir);
            }
        });
        // if some files remain, that means they have been deleted since last scan
        return modified || !presents.isEmpty();
    }