rmdir()¶
- audeer.rmdir(path, *paths, follow_symlink=True)[source]¶
Remove directory.
Remove the directory and all its content if the directory exists.
- Parameters
- Raises
NotADirectoryError – if path is not a directory
OSError – if
follow_symlink
isFalse
andpath
is a symbolic link
Examples
>>> _ = mkdir("path1", "path2", "path3") >>> list_dir_names("path1", basenames=True) ['path2'] >>> rmdir("path1", "path2") >>> list_dir_names("path1") []