cbz all subdirectories in a directory
510961
def cbz(dir)
      Mangdown::CBZ.all(dir)
    rescue StandardError => error
      raise Mangdown::Error, "Failed to package #{dir}: #{error.message}"
    end
993719
def abslistdir(directory):
    
    abs_dir = os.path.abspath(directory)
    filenames = os.listdir(abs_dir)
    return [os.path.join(abs_dir, filename) for filename in filenames]
1083523
def find_subdirectories(basepath):
    '''
    
    '''
    directories = []
    for root, dirnames, filenames in os.walk(basepath):
        new_directories = [d for d in dirnames if d not in directories]
        directories = directories + new_directories
    return directories
1042861
def listdir(self, dirname):
        """"""
        client = boto3.client("s3")
        bucket, path = self.bucket_and_path(dirname)
        p = client.get_paginator("list_objects")
        if not path.endswith("/"):
            path += "/"  # This will now only retrieve subdir content
        keys = []
        for r in p.paginate(Bucket=bucket, Prefix=path, Delimiter="/"):
            keys.extend(o["Prefix"][len(path):-1] for o in r.get("CommonPrefixes", []))
            for o in r.get("Contents", []):
                key = o["Key"][len(path):]
                if key:  # Skip the base dir, which would add an empty string
                    keys.append(key)
        return keys
108408
def ls_dir(base_dir):
    """"""
    return [
        os.path.join(dirpath.replace(base_dir, '', 1), f)
        for (dirpath, dirnames, files) in os.walk(base_dir)
        for f in files
    ]
1313799
def listdirs(path='.'):
    """"""
    import os
    for f in os.listdir(path):
        if isdir(join(path, f)):
            yield join(path, f) if path != '.' else f
1350516
def get_subdirectories(directory):
    
    return [name for name in os.listdir(directory)
            if name != '__pycache__'
            if os.path.isdir(os.path.join(directory, name))]
216982
function findDir(dirList, ifCb, elseCb) {
  async.detect(dirList, dirExists, function (dir) {
    if (dir) {
      ifCb(dir);
    } else {
      elseCb();
    }
  });
}
745169
def dirs(self):
        """"""
        contents = self.paths
        contents = (BinDir(path.path) for path in contents if path.is_dir)
        return contents
674761
def RDirs(self, pathlist):
        """"""
        cwd = self.cwd or self.fs._cwd
        return cwd.Rfindalldirs(pathlist)
1360093
public Set getAllDirectoriesBelow(File dir) {
        Set allDirectories = new HashSet();
        if (dir.isDirectory()) {
            primGetAllDirectoriesBelow(dir, allDirectories);
        }
        return allDirectories;
    }
768749
def _recursive_get_all_file_names(dir):
    
    if not dir:
        return []

    result = []
    for basedir, dirs, files in os.walk(dir):
        result.extend(files)

    return result
362160
def dlls_in_subdirs(directory):
    """"""
    files = []
    for root, dirs, files in os.walk(directory):
        files.extend(dlls_in_dir(root))
519965
def go_to_parent_directory(self):
        """"""
        self.chdir(osp.abspath(osp.join(getcwd_or_home(), os.pardir)))
1177864
def get_subdirs(directory):
    
    return [os.path.join(directory, name)
            for name in os.listdir(directory)
            if os.path.isdir(os.path.join(directory, name))]
101206
def dir_list(directory):
    ''''''
    try:
        content = listdir(directory)
        return content
    except WindowsError as winErr:
        print("Directory error: " + str((winErr)))
651446
private void updateSubdirectories(ISO9660Directory dir) {
    	List<ISO9660Directory> subdirectories = dir.getDirectories();
    	Iterator<ISO9660Directory> iter = subdirectories.iterator();
    	while (iter.hasNext()) {
    		ISO9660Directory subdir = (ISO9660Directory) iter.next();
    		subdir.setLevel(dir.getLevel() + 1);
    		subdir.setRoot(dir.getRoot());
    		updateSubdirectories(subdir);
    	}
    }