Returns set of items.

        :param path: Regex filter on item path.

        :return: List of Item class objects.
5643
def items(self, path=None):
        
        items = list(self.iteritems())
        if path is not None:
            path += '$'
            regex = re.compile(path)
            items = [i for i in items if regex.match(i.path)]
        return items
270677
def get_path(self, path):
        
        mapping = self.get_path_mapping(path)
        return self.path_class(api=self, path=path, mapping=mapping)
849119
def filter_files(self, path):
        
        excludes = r'|'.join([fnmatch.translate(x) for x in self.project.EXCLUDES]) or r'$.'
        for root, dirs, files in os.walk(path, topdown=True):
            dirs[:] = [d for d in dirs if not re.match(excludes, d)]
            dirs[:] = [os.path.join(root, d) for d in dirs]
            rel_path = os.path.relpath(root, path)

            paths = []
            for f in files:
                if rel_path == '.':
                    file_path = f
                else:
                    file_path = os.path.join(rel_path, f)
                if not re.match(excludes, file_path):
                    paths.append(f)

            files[:] = paths
            yield root, dirs, files
751025
def _get_child_class(self, path):
        
        if self._child_entity is None:
            return BIDSNode

        for i, child_ent in enumerate(listify(self._child_entity)):
            template = self.available_entities[child_ent].directory
            if template is None:
                return BIDSNode
            template = self.root_path + template
            # Construct regex search pattern from target directory template
            to_rep = re.findall(r'\{(.*?)\}', template)
            for ent in to_rep:
                patt = self.available_entities[ent].pattern
                template = template.replace('{%s}' % ent, patt)
            template += r'[^\%s]*$' % os.path.sep
            if re.match(template, path):
                return listify(self._child_class)[i]

        return BIDSNode
611941
def path_parts(path):
    
    path = path if path is not None else ''
    container_path = object_path = ''
    parts = path_list(path)

    if len(parts) >= 1:
        container_path = parts[0]
    if len(parts) > 1:
        object_path = path_join(*parts[1:])

    return container_path, object_path
240111
def get_collection(self, path):
        """"""
        while True:
            items = self.get(path)
            req = self.req
            for item in items:
                yield item
            if req.links and req.links['next'] and\
                    req.links['next']['rel'] == 'next':
                path = req.links['next']['url']
            else:
                break
749449
def get_repos(path):
    
    p = str(path)
    ret = []
    if not os.path.exists(p):
        return ret
    for d in os.listdir(p):
        pd = os.path.join(p, d)
        if os.path.exists(pd) and is_repo(pd):
            ret.append(Local(pd))
    return ret
573157
def get_by_path(path, _globals=None):
    
    if _globals is None:
        _globals = list()
    return _get_by_path(path.split('.'), _globals)
304107
def get_elements(path)
      elements = self./(path)
      return unless elements
      elements = elements.map{|element| Element.new(element)}
    end
699734
def getitem_by_path(d, path):
    
    return reduce(
        lambda d, k: d[k],
        path,
        d
    )
789795
function (path) {
    let classes = [];

    let files = fs.readdirSync(path);
    for (let i = 0; i < files.length; i++) {
      let clazz = require(path + '/' + files[i]);
      classes.push(clazz);
    }

    return classes;
  }
1270004
def listdir(path='.'):
    
    return [name.rstrip('/') for name, _ in
            get_instance(path).list_objects(path, first_level=True)]
588813
def all(path, options = {}, &block)
      all = []
      list_type, list_item = get_list_types(path)

      result = request('GET', path, options)
      raise RequestError.new result.status if result.status_code != 200 or result.parsed[list_type].nil?

      total = result.parsed[list_type]['totalItems'].to_i
      items = result.parsed[list_type]['itemsInPage'].to_i
      return all if total == 0

      pages = (total / config.page_size) + 1
      (0 .. pages - 1).each do |i|
        options[:query][:pgNum] = i
        result     = request('GET', path, options)
        raise RequestError.new result.status if result.status_code != 200
        list_items = result.parsed[list_type][list_item]
        list_items = [ list_items ] if items == 1
        list_items.each { |item| yield item if block_given? }
        all.concat list_items
      end
      all
    end
372870
def match(self, path):
        ''''''
        match = self._regex.search(path)
        if match is not None:
            remaining = path[match.end():]
            groups = match.groupdict()
            result = {}
            for name, value in groups.items():
                try:
                    value = self._converters[name].to_python(value)
                except Http404:
                    return
                result[str(name)] = value
            if remaining:
                result['__remaining__'] = remaining
            return result
740007
def find(self, path, all=False):
        
        try:
            start, _, extn = path.rsplit('.', 2)
        except ValueError:
            return []
        path = '.'.join((start, extn))
        return find(path, all=all) or []
1786
def get_object_from_path(path):
    
    try:
        return sys.IMPORT_CACHE[path]
    except KeyError:
        _path = path.split('.')
        module_path = '.'.join(_path[:-1])
        class_name = _path[-1]
        module = importlib.import_module(module_path)
        sys.IMPORT_CACHE[path] = getattr(module, class_name)
        return sys.IMPORT_CACHE[path]
793776
def get_includes(self, path):
        
        config = self.file_index.unfold_yaml(path)

        return self.get_includes_from_dict(config, extract=True)