Get a list of directries.

This commit is contained in:
20xd6
2024-09-17 15:20:46 -04:00
parent d32681729f
commit 4c6bd5aeee
3 changed files with 23 additions and 1 deletions
+8
View File
@@ -0,0 +1,8 @@
import os
def get_all(path):
all_dirs = []
for root, dirs, files in os.walk(path):
all_dirs.extend(dir for dir in dirs if os.path.isdir(os.path.join(root, dir)))
all_dirs = all_dirs[1:]
return all_dirs