storage_manager.py 505 字节
Newer Older
J
jinhai 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
import os, shutil
from engine.settings import DATABASE_DIRECTORY

class StorageManager(object):
    @staticmethod
    def CreateGroup(group_name):
        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