File size: 260 Bytes
1b98c5d
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import os


def remove_files(dirs):
    for f in os.listdir(dirs):
        os.remove(os.path.join(dirs, f))


def make_directory_if_not_exists(dir_name):
    if not os.path.exists(dir_name):
        os.mkdir(dir_name)
    else:
        remove_files(dir_name)