for name in dirs:
os.rmdir(os.path.join(root, name))
+ .. audit-event:: os.walk top,topdown,onerror,followlinks os.walk
+
.. versionchanged:: 3.5
This function now calls :func:`os.scandir` instead of :func:`os.listdir`,
making it faster by reducing the number of calls to :func:`os.stat`.
for name in dirs:
os.rmdir(name, dir_fd=rootfd)
+ .. audit-event:: os.fwalk top,topdown,onerror,follow_symlinks,dir_fd os.fwalk
+
.. availability:: Unix.
.. versionadded:: 3.3
Using the "``**``" pattern in large directory trees may consume
an inordinate amount of time.
+ .. audit-event:: pathlib.Path.glob self,pattern pathlib.Path.glob
+
.. method:: Path.group()
PosixPath('setup.py'),
PosixPath('test_pathlib.py')]
+ .. audit-event:: pathlib.Path.rglob self,pattern pathlib.Path.rglob
+
.. method:: Path.rmdir()