list_dir_names()¶
- audeer.list_dir_names(path, *, basenames=False, recursive=False, hidden=True)[source]¶
List of folder names located inside provided path.
- Parameters
- Return type
- Returns
list of paths to directories
- Raises
NotADirectoryError – if path is not a directory
FileNotFoundError – if path does not exists
Examples
>>> _ = mkdir("path", "a", ".b", "c") >>> list_dir_names( ... "path", ... basenames=True, ... ) ['a'] >>> list_dir_names( ... "path", ... basenames=True, ... recursive=True, ... ) ['a', 'a/.b', 'a/.b/c'] >>> list_dir_names( ... "path", ... basenames=True, ... recursive=True, ... hidden=False, ... ) ['a']