Returns a filtered list of `paths`, where every name matches our format.

    Args:
        paths: A list of file names.
346654
def filter_db_names(paths: List[str]) -> List[str]:
    
    return [
        db_path
        for db_path in paths
        if VERSION_RE.match(os.path.basename(db_path))
    ]
49884
def path_dirs(urls):
    '''
    
    '''
    path_dirs = StringCounter()
    for url in urls:
        for path_dir in filter(None, urlparse(url).path.split('/')):
            path_dirs[path_dir] += urls[url]
    return path_dirs
1258220
def clean_file_system_paths_from_not_existing_paths(file_system_paths):
    
    paths_to_delete = []
    for path in file_system_paths:
        if not os.path.exists(path):
            paths_to_delete.append(path)
    for path in paths_to_delete:
        file_system_paths.remove(path)
16371
def get_path_list(opts):
    
    paths = []
    for opt, arg in list(opts.items()):
        if opt in ('-p', '--jspath'):
            paths.append(arg)
    return paths or [os.getcwd()]
818743
def format_paths(paths, filepath)
      # Extract included paths
      paths
        .map { |path| File.join(File.dirname(filepath), path) }
        .map { |path| File.expand_path(path) }
        .select { |path| File.exist?(path) || Dir.exist?(path) }
    end
1335002
def get_unused_paths(self):
        
        return [path for path in self.filter.paths if path not in self.seen_paths]
1056517
def listdir(*paths, glob=None):
    '''
    
    '''
    path = genpath(*paths)

    names = os.listdir(path)
    if glob is not None:
        names = fnmatch.filter(names, glob)

    retn = [os.path.join(path, name) for name in names]
    return retn
390095
def _iter_full_paths(path_list):
    
    for path in path_list:
        if not os.path.isdir(path):
            full_path = os.path.realpath(path)
            yield path
        else:
            for root, dirs, filenames in os.walk(path):
                for filename in filenames:
                    full_path = os.path.realpath(os.path.join(root, filename))
                    yield full_path
980590
public static Predicate paths(final String... paths) {
        final PathMatchPredicate[] predicates = new PathMatchPredicate[paths.length];
        for (int i = 0; i < paths.length; ++i) {
            predicates[i] = new PathMatchPredicate(paths[i]);
        }
        return or(predicates);
    }
825615
def paths(self):
        """"""
        if not self.select_paths:
            return sys.path
        result = []
        match_any = set()
        for path in sys.path:
            path = os.path.normcase(os.path.abspath(path))
            for match in self.select_paths:
                match = os.path.normcase(os.path.abspath(match))
                if '*' in match:
                    if re.search(fnmatch.translate(match+'*'), path):
                        result.append(path)
                        match_any.add(match)
                        break
                else:
                    if path.startswith(match):
                        result.append(path)
                        match_any.add(match)
                        break
            else:
                logger.debug("Skipping path %s because it doesn't match %s"
                             % (path, ', '.join(self.select_paths)))
        for match in self.select_paths:
            if match not in match_any and '*' not in match:
                result.append(match)
                logger.debug("Adding path %s because it doesn't match anything already on sys.path"
                             % match)
        return result
791003
def include_path(self, path):
        
        self.seen_paths.add(path)
        return self.filter.include(path)
100364
def _filtered_walk(path, file_filter):
		
		for root, dirs, files in os.walk(path):
			log.debug('looking in %s', root)
			log.debug('files is %s', files)
			file_filter.set_root(root)
			files = filter(file_filter, files)
			log.debug('filtered files is %s', files)
			yield (root, dirs, files)
881828
def merge_split(*paths):
  
  filtered_paths = filter(None, paths)
  return [p for p in ':'.join(filtered_paths).split(':') if p]
251974
def read_file(paths):
    

    if isinstance(paths, str):
        paths = [paths]

    re = {}
    for path in paths:
        cfg = yaml.load(open(path))
        merge(re, cfg)

    return re
906189
def find_files(path, filter="*.md"):
        
        if os.path.isfile(path):
            return [path]

        if os.path.isdir(path):
            matches = []
            for root, dirnames, filenames in os.walk(path):
                for filename in fnmatch.filter(filenames, filter):
                    matches.append(os.path.join(root, filename))
            return matches
1001185
function getFiles(paths) {
  var result = fileUtil.getAllFiles(paths);

  var files = result.map(function (item) {
    return item.relativePath;
    // return path.join(item.basePath, item.relativePath);
  });

  return files;
}
1270004
def listdir(path='.'):
    
    return [name.rstrip('/') for name, _ in
            get_instance(path).list_objects(path, first_level=True)]