mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-08 01:58:34 +08:00
24 lines
600 B
Python
24 lines
600 B
Python
import os, shutil
|
|
|
|
class GroupHandler(object):
|
|
|
|
@staticmethod
|
|
def CreateGroupDirectory(group_id):
|
|
path = GetGroupDirectory(group_id)
|
|
path = path.strip()
|
|
path=path.rstrip("\\")
|
|
if not os.path.exists():
|
|
os.makedirs(path)
|
|
|
|
|
|
@staticmethod
|
|
def DeleteGroupDirectory(group_id):
|
|
path = GetGroupDirectory(group_id)
|
|
path = path.strip()
|
|
path=path.rstrip("\\")
|
|
if os.path.exists():
|
|
shutil.rmtree(path)
|
|
|
|
@staticmethod
|
|
def GetGroupDirectory(group_id):
|
|
return DATABASE_DIRECTORY + '/' + group_id |