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
>>> path = audeer.path("path") >>> _ = mkdir(path, "a", ".b", "c") >>> audeer.list_dir_names(path, basenames=True) ['a'] >>> audeer.list_dir_names(path, basenames=True, recursive=True) ['a', 'a/.b', 'a/.b/c'] >>> audeer.list_dir_names(path, basenames=True, recursive=True, hidden=False) ['a']