forked from anixart-mod/patcher
init
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
# Remove unnecessary files
|
||||
|
||||
import os
|
||||
import shutil
|
||||
|
||||
def apply(config: dict) -> bool:
|
||||
for item in os.listdir("./decompiled/unknown/"):
|
||||
item_path = os.path.join("./decompiled/unknown/", item)
|
||||
|
||||
if os.path.isfile(item_path):
|
||||
os.remove(item_path)
|
||||
print(f'Удалён файл: {item_path}')
|
||||
elif os.path.isdir(item_path):
|
||||
if item not in config["cleanup"]["keep_dirs"]:
|
||||
shutil.rmtree(item_path)
|
||||
print(f'Удалена папка: {item_path}')
|
||||
return True
|
||||
Reference in New Issue
Block a user