Returns True if first_path's mtime is higher than second_path's mtime.
430429
def modified_after(first_path, second_path):
    """"""
    try:
        first_mtime = os.stat(first_path).st_mtime
    except EnvironmentError:
        return False
    try:
        second_mtime = os.stat(second_path).st_mtime
    except EnvironmentError:
        return True
    return first_mtime > second_mtime
1075138
def has(self, key, mtime=None):
        
        v = self.__values.get(key, None)
        if not v:
            return False
        if self.check_modified_time:
            mtime = self._get_mtime(key, mtime)
            if mtime != self.__modified_times[key]:
                del self[key]
                return False
        return True
1141202
def recursive_mtime(path, newest=True):
    """"""
    if os.path.isfile(path):
        return mtime(path)
    current_extreme = None
    for dirname, _, filenames in os.walk(path, topdown=False):
        for filename in filenames:
            mt = mtime(os.path.join(dirname, filename))
            if newest:  # Put outside of loop?
                if mt >= (current_extreme or mt):
                    current_extreme = mt
            elif mt <= (current_extreme or mt):
                current_extreme = mt
    return current_extreme
388119
def exists(self, path, mtime=None):
        
        self._connect()

        if self.sftp:
            exists = self._sftp_exists(path, mtime)
        else:
            exists = self._ftp_exists(path, mtime)

        self._close()

        return exists
371362
public int compare(FileStatus fileStatus1, FileStatus fileStatus2) {

    // Do the obligatory null checks.
    if ((fileStatus1 == null) && (fileStatus2 == null)) {
      return 0;
    }
    if (fileStatus1 == null) {
      return -1;
    }
    if (fileStatus2 == null) {
      return 1;
    }

    long modificationTime1 = fileStatus1.getModificationTime();
    long modificationTime2 = fileStatus2.getModificationTime();

    return (modificationTime1 < modificationTime2 ? -1
        : (modificationTime1 == modificationTime2 ? 0 : 1));
  }
261663
def diff_mtime_map(map1, map2):
    '''
    
    '''
    # check if the mtimes are the same
    if sorted(map1) != sorted(map2):
        return True

    # map1 and map2 are guaranteed to have same keys,
    # so compare mtimes
    for filename, mtime in six.iteritems(map1):
        if map2[filename] != mtime:
            return True

    # we made it, that means we have no changes
    return False
741163
protected function isSameFilesystem(
        /*# string */ $path1,
        /*# string */ $path2
    )/*# : bool */ {
        return $this->path($path1)->getFilesystem() === $this->path($path2)->getFilesystem();
    }
639764
def _cmp_by_aspath(path1, path2):
    
    as_path1 = path1.get_pattr(BGP_ATTR_TYPE_AS_PATH)
    as_path2 = path2.get_pattr(BGP_ATTR_TYPE_AS_PATH)
    assert as_path1 and as_path2
    l1 = as_path1.get_as_path_len()
    l2 = as_path2.get_as_path_len()
    assert l1 is not None and l2 is not None
    if l1 > l2:
        return path2
    elif l2 > l1:
        return path1
    else:
        return None
1223340
def is_subdirectory(path_a, path_b):
    """"""
    path_a = os.path.realpath(path_a)
    path_b = os.path.realpath(path_b)
    relative = os.path.relpath(path_a, path_b)
    return (not relative.startswith(os.pardir + os.sep))
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
570887
private static boolean isFirstTime() {
        Path acceptedLicenseFile = Paths.get(Constant.getInstance().ACCEPTED_LICENSE);
        return Files.notExists(acceptedLicenseFile);
    }
757386
def is_younger(path, age):
    
    try:
        return time.time() - os.path.getmtime(path) < age

    except (OSError, TypeError):
        return False
1243729
def check_for_unc_path(path):
    
    if (
        os.name == "nt"
        and len(path.drive) > 2
        and not path.drive[0].isalpha()
        and path.drive[1] != ":"
    ):
        return True
    else:
        return False
1369505
def compare_path_strings(path1, path2, path_sep='/'):
    
    if len(path2) < len(path1):
        return 0
    if path1 == path2:
        return ISFILE
    else:
        p1_parts = path1.split(path_sep)
        p2_parts = path2.split(path_sep)
        if len(p2_parts) < len(p1_parts):
            return 0
        else:
            return compare_parts(p1_parts, p2_parts)
1372763
def is_rising(bins) -> bool:
    
    # TODO: Optimize for numpy bins
    bins = make_bin_array(bins)
    if np.any(bins[:, 0] >= bins[:, 1]):
        return False
    if np.any(bins[1:, 0] < bins[:-1, 1]):
        return False
    return True
1114277
private boolean hasLeapMonth(long m0, long m) {
        return (
            (m >= m0)
            && (this.hasNoMajorSolarTerm(m) || this.hasLeapMonth(m0, this.newMoonBefore(m)))
        );
    }
745822
def older_message(m, lastm):
    ''''''
    atts = {'time_boot_ms' : 1.0e-3,
            'time_unix_usec' : 1.0e-6,
            'time_usec' : 1.0e-6}
    for a in atts.keys():
        if hasattr(m, a):
            mul = atts[a]
            t1 = m.getattr(a) * mul
            t2 = lastm.getattr(a) * mul
            if t2 >= t1 and t2 - t1 < 60:
                return True
    return False