Determines if path_name has a suffix of at least 'suffix'
167019
def has_suffix(path_name, suffix):
    
    if isinstance(suffix, str):
        suffix = disintegrate(suffix)

    components = disintegrate(path_name)

    for i in range(-1, -(len(suffix) + 1), -1):
        if components[i] != suffix[i]:
            break
    else:
        return True
    return False
676012
static private boolean hasFileMatch(String path, List<String> patterns) {
        path = Util.normalizeDriveLetter(path);
        for (String p : patterns) {
            // Exact match
            if (p.equals(path)) {
                return true;
            }
            // Single dot the end matches this package and all its subpackages.
            if (p.startsWith("*")) {
                // Remove the wildcard
                String patsuffix = p.substring(1);
                // Does the path start with the pattern prefix?
                if (path.endsWith(patsuffix)) {
                    return true;
                }
            }
        }
        return false;
    }
265455
def basename(self, suffix=''):
		''' '''
		return os.path.basename(self._file, suffix) if self._file else None
193437
def dyld_image_suffix_search(iterator, env=None):
    """"""
    suffix = dyld_image_suffix(env)
    if suffix is None:
        return iterator
    def _inject(iterator=iterator, suffix=suffix):
        for path in iterator:
            if path.endswith('.dylib'):
                yield path[:-len('.dylib')] + suffix + '.dylib'
            else:
                yield path + suffix
            yield path
    return _inject()
600825
def get_file_suffix(self, path, prefix):
        
        parent = self._ensure_folder_path(path)

        file_list = self.drive.ListFile({
            'q': "'{}' in parents and trashed=false and title contains '{}'".format(
                parent['id'], prefix)}).GetList()
        try:
            number_of_files = len(file_list)
        except:
            number_of_files = 0
        return '{0:04}'.format(number_of_files)
720096
def is_paths(maybe_paths, marker='*'):
    
    return ((is_path(maybe_paths) and marker in maybe_paths) or  # Path str
            (is_path_obj(maybe_paths) and marker in maybe_paths.as_posix()) or
            (is_iterable(maybe_paths) and
             all(is_path(p) or is_ioinfo(p) for p in maybe_paths)))
222106
def sort_key_for_numeric_suffixes(path, sep='.', suffix_index=-2):
    
    chunks = path.split(sep)
    # Remove suffix from path and convert to int
    if chunks[suffix_index].isdigit():
        return sep.join(chunks[:suffix_index] + chunks[suffix_index+1:]), int(chunks[suffix_index])
    return path, 0
135310
def path_has(self, **kwargs):
            
            str_node    = "/" # This node will always be "False"
            for key, val in kwargs.items():
                if key == 'node':   str_node = val
            if str_node in self.l_cwd:
                return { 'found':   True,
                         'indices': [i for i, x in enumerate(self.l_cwd) if x == str_node]}
            else:
                return { 'found':   False,
                         'indices': [-1]}
135796
boolean isPrefixOf(BasePath<B> path) {
    ImmutableList<String> prefixSegments = getSegments();
    ImmutableList<String> childSegments = path.getSegments();
    if (prefixSegments.size() > path.getSegments().size()) {
      return false;
    }
    for (int i = 0; i < prefixSegments.size(); i++) {
      if (!prefixSegments.get(i).equals(childSegments.get(i))) {
        return false;
      }
    }
    return true;
  }
1101521
public boolean isPrefixOf(Path path) {
        if (this.getLength() > path.getLength()) {
            return false;
        }
        for (int i = 0; i < getLength(); i++) {
            if (this.getBlockIdAt(i) != path.getBlockIdAt(i)) {
                return false;
            }
        }
        return true;
    }
98844
def get_file_suffix(self, path, prefix):
        
        try:
            number_of_files = len(glob.glob(os.path.join(path, prefix) + '*'))
        except:
            number_of_files = 0
        return '{0:04}'.format(number_of_files)
513103
@Override
	public boolean matchPath(String path) {

		boolean match = false;
		if (StringUtils.isNotEmpty(path)) {
			match = path.endsWith(suffix);
		}
		return match;
	}
1118832
def match_extension(f):
    ''''''
    (root,ext) = os.path.splitext(f)
    return ext.lower() in extensions
1357334
def setup_prefix_suffix(self):
        

        self.compile_prefix = 'compile_'
        self.sourcepath_suffix = '_sourcepath'
        self.modpath_suffix = '_modpaths'
        self.targetpath_suffix = '_targetpaths'
1316342
def with_suffix(self, suffix):
        
        obj = super(ArtifactoryPath, self).with_suffix(suffix)
        obj.auth = self.auth
        obj.verify = self.verify
        obj.cert = self.cert
        obj.session = self.session
        return obj
1199599
def add_suffix(file_path, suffix='modified', sep='_', ext=None):
    """"""
    return _add_suffix(file_path, suffix, sep, ext)
1041901
def add_suffix(filename, suffix):
        
        path = filename.split("/")
        parts = path[-1].split(".")
        i = max(len(parts) - 2, 0)
        parts[i] = parts[i] + suffix
        path[-1] = ".".join(parts)
        return "/".join(path)