Get an iter of VenvDirs and VenvFiles within the directory.
546148
def items(self):
        """"""
        contents = self.paths
        contents = (
            BinFile(path.path) if path.is_file else BinDir(path.path)
            for path in contents
        )
        return contents
276520
function getFiles(folder = srcFolder){
  let all = [];
  let f = fs.readdirSync(folder);
  for(file of f){
    all.push(path.join(folder,file))
    if(fs.lstatSync(path.join(folder,file)).isDirectory()){
      all = all.concat(getFiles(path.join(folder,file)));
    }
  }
  return all;
}
1112094
def get_paths(self):
        '''
        
        '''

        # guess site package dir of virtualenv (system dependent)
        venv_site_packages = '%s/lib/site-packages' % self.venv_dir

        if not os.path.isdir(venv_site_packages):
            venv_site_packages_glob = glob.glob('%s/lib/*/site-packages' % self.venv_dir)

            if len(venv_site_packages_glob):
                venv_site_packages = venv_site_packages_glob[0]

        return [
            self.venv_dir,
            venv_site_packages
        ]
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
404728
def get_vtt_files(inputfile):
    """"""
    vtts = []

    for f in inputfile:
        filename = f.split('.')
        filename = '.'.join(filename[0:-1])
        vtt = glob(filename + '*.vtt')
        if len(vtt) > 0:
            vtts.append({'vtt': vtt[0], 'video': f})

    if len(vtts) == 0:
        print("[!] No vtt files were found.")
        return False

    return vtts
625597
def iter_platform_files(dst):
     
    for root, dirs, files in os.walk(dst):
        for fn in files:
            fn = os.path.join(root, fn)
            if is_platform_file(fn):
                yield fn
404652
def _get_files(self) -> Iterator[str]:
        
        path = os.path.abspath(self.path)
        if os.path.isfile(path):
            path = os.path.dirname(path)

        for path in self._get_parents(path):
            for file_path in self._get_files_from_dir(path):
                yield file_path
1285724
def iter_paths(src_dir):
    
    for x in scandir(os.path.join(src_dir)):
        if x.is_dir(follow_symlinks=False):
            for x in iter_paths(x.path):
                yield x
        else:
            yield x
333965
def file_attribs(location,
                 mode=None,
                 owner=None,
                 group=None,
                 use_sudo=False,
                 recursive=True):
    """"""
    return dir_attribs(location=location,
                       mode=mode,
                       owner=owner,
                       group=group,
                       recursive=recursive,
                       use_sudo=False)
1272219
def iter_entries(self):
        
        for idx in range(self._entry_count):
            dir_entry_offset = self._offset + 2 + (idx*12)
            ifd_entry = _IfdEntryFactory(self._stream_rdr, dir_entry_offset)
            yield ifd_entry
538575
def iterpaths(self):
        
        try:
            for path in self.order:
                yield path
        except:
            for path in self.files:
                yield path
244014
def _iter_module_files():
    
    # The list call is necessary on Python 3 in case the module
    # dictionary modifies during iteration.
    for module in list(sys.modules.values()):
        if module is None:
            continue
        filename = getattr(module, "__file__", None)
        if filename:
            if os.path.isdir(filename) and os.path.exists(
                os.path.join(filename, "__init__.py")
            ):
                filename = os.path.join(filename, "__init__.py")

            old = None
            while not os.path.isfile(filename):
                old = filename
                filename = os.path.dirname(filename)
                if filename == old:
                    break
            else:
                if filename[-4:] in (".pyc", ".pyo"):
                    filename = filename[:-1]
                yield filename
674761
def RDirs(self, pathlist):
        """"""
        cwd = self.cwd or self.fs._cwd
        return cwd.Rfindalldirs(pathlist)
632173
def iter_tree(jottapath, JFS):
    """"""
    filedirlist = JFS.getObject('%s?mode=list' % jottapath)
    log.debug("got tree: %s", filedirlist)
    if not isinstance(filedirlist, JFSFileDirList):
        yield ( '', tuple(), tuple() )
    for path in filedirlist.tree:
        yield path
473997
def from_folder(cls, path:PathOrStr, extensions:Collection[str]=None, recurse:bool=True,
                    include:Optional[Collection[str]]=None, processor:PreProcessors=None, **kwargs)->'ItemList':
        """"""
        path = Path(path)
        return cls(get_files(path, extensions, recurse=recurse, include=include), path=path, processor=processor, **kwargs)
1230113
def volumes(self):
    """"""
    if not self._is_parsed:
      self._Parse()
      self._is_parsed = True

    return iter(self._volumes.values())
1120463
def _iter_files(self, mod_name):
        '''
        
        '''
        # do we have an exact match?
        if mod_name in self.file_mapping:
            yield mod_name

        # do we have a partial match?
        for k in self.file_mapping:
            if mod_name in k:
                yield k

        # anyone else? Bueller?
        for k in self.file_mapping:
            if mod_name not in k:
                yield k