blob: fda783e40cf8f27872ee7f16986018993b886822 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
import os
dir_structure = None
class DirectoryStructure:
def __init__(
self,
database="hircine.db",
scan="content/",
objects="objects/",
backups="backups/",
config="hircine.ini",
):
self.database = database
self.scan = scan
self.objects = objects
self.backups = backups
self.config = config
def mkdirs(self): # pragma: no cover
os.makedirs(self.objects, exist_ok=True)
os.makedirs(self.scan, exist_ok=True)
os.makedirs(self.backups, exist_ok=True)
def init_dir_structure(): # pragma: no cover
global dir_structure
dir_structure = DirectoryStructure()
return dir_structure
def get_dir_structure():
global dir_structure
return dir_structure
|