get_immediate_subdirectories

cosmo_utils.utils.file_utils.get_immediate_subdirectories(pathdir, sort=True)[source] [edit on github]

Immediate subdirectories to a given directory path

Parameters:

pathdir : str

Path to the desired directory

Returns:

subdir_arr : array_like or array of strings

Array of paths of subdirectories of pathdir

sort : bool, optional (default = True)

If this is set to True, the output list is sorted by name