2019-04-09 03:26:12 +00:00
|
|
|
import os, shutil
|
|
|
|
from engine.settings import DATABASE_DIRECTORY
|
|
|
|
|
|
|
|
class StorageManager(object):
|
|
|
|
@staticmethod
|
2019-04-09 03:34:37 +00:00
|
|
|
def AddGroup(group_name):
|
2019-04-09 03:26:12 +00:00
|
|
|
path = StorageManager.GetGroupDirectory(group_name)
|
|
|
|
path = path.strip()
|
|
|
|
path=path.rstrip("\\")
|
|
|
|
if not os.path.exists(path):
|
|
|
|
os.makedirs(path)
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def GetGroupDirectory(group_name):
|
|
|
|
return DATABASE_DIRECTORY + '/' + group_name
|
|
|
|
|
|
|
|
def Read():
|
|
|
|
pass
|
|
|
|
|
|
|
|
def Write():
|
|
|
|
pass
|