File size: 469 Bytes
80287e2 e0c577a 80287e2 e0c577a 80287e2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import os
from ..logging import LOGGER
def dirr():
for file in os.listdir():
if file.endswith(".jpg"):
os.remove(file)
elif file.endswith(".jpeg"):
os.remove(file)
elif file.endswith(".png"):
os.remove(file)
if "downloads" not in os.listdir():
os.mkdir("/tmp/downloads")
if "cache" not in os.listdir():
os.mkdir("/tmp/cache")
LOGGER(__name__).info("Directories Updated.")
|