Release Candidate 1 for the people
This commit is contained in:
parent
174dd557e5
commit
fbda98805f
10 changed files with 235 additions and 117 deletions
atlasimagecomposer/utils
0
atlasimagecomposer/utils/__init__.py
Normal file
0
atlasimagecomposer/utils/__init__.py
Normal file
15
atlasimagecomposer/utils/filesystem.py
Normal file
15
atlasimagecomposer/utils/filesystem.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
import pathlib
|
||||
|
||||
|
||||
def rmdir(directory: pathlib.Path):
|
||||
"""
|
||||
Recursively deletes all files and folders in a given directory
|
||||
|
||||
From: https://stackoverflow.com/a/49782093 (thanks mitch)
|
||||
"""
|
||||
for item in directory.iterdir():
|
||||
if item.is_dir():
|
||||
rmdir(item)
|
||||
else:
|
||||
item.unlink()
|
||||
directory.rmdir()
|
Loading…
Add table
Add a link
Reference in a new issue