當前位置: 首頁>>代碼示例>>Python>>正文


Python Files.getGroupFolder方法代碼示例

本文整理匯總了Python中Files.getGroupFolder方法的典型用法代碼示例。如果您正苦於以下問題:Python Files.getGroupFolder方法的具體用法?Python Files.getGroupFolder怎麽用?Python Files.getGroupFolder使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Files的用法示例。


在下文中一共展示了Files.getGroupFolder方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: import Files [as 別名]
# 或者: from Files import getGroupFolder [as 別名]
 def __init__(self, group):
   #Users will be "verified" when communicating with the server. 
   #People who do not exist will not usually be sent in requests for group members
   self.hasVerified = False
   self.group = group #Group reference
   
   self.dirName = Files.join(Files.getGroupFolder(self.group), "Users")
   
   #Note: position in userList is not static 
   self.userList = [] #This will be where users are normally stored
   self.IDDict = {}
   self.aliasList = {}
   
   #Creates folder if it does not exist
   Files.createFolder(self.dirName)
開發者ID:civilwargeeky,項目名稱:GroupMeServer3,代碼行數:17,代碼來源:Users.py

示例2: __init__

# 需要導入模塊: import Files [as 別名]
# 或者: from Files import getGroupFolder [as 別名]
 def __init__(self, ID = None, groupID = None): #groupID is the GroupMe groupID, not internal (ID is internal)
   self.groupID = groupID
   self.name = None
   self.image = None
   self.password = None #This should be in MainGroup, but it doesn't save an attrTable and I have no way of changing it without breaking existing server
   #The owner is not necessary, but if there are multiple users with tokens, this will resolve issues
   self.owner = None #The owner is a token of the owner user
   self.bot   = None #This is the group's bot id that it uses to post messages
   #These are just save objects to be used by other modules
   self.analytics = {}
   self.commands  = {}
   
   self.markedForDeletion = False #Groups can get deleted. I want to delete the ones that don't exist, just not during initialization
   
   groupRegister(self, ID) #If no ID, will assign an id automatically
   
   self.folderPath = Files.getGroupFolder(self)
   self.filePath   = Files.getFileName(Files.join(self.folderPath, SAVE_FILE_NAME))
   
   #This UserList should be empty and just a reference to the object
   #Users should be loaded in postInit once we have gotten user data from internet
   self.users    = Users.UserList(self)
   self.handler  = Network.GroupMeHandler(self)
   self.commandBuilder = Commands.CommandBuilder(self)
開發者ID:civilwargeeky,項目名稱:GroupMeServer3,代碼行數:26,代碼來源:Groups.py

示例3: deleteSelf

# 需要導入模塊: import Files [as 別名]
# 或者: from Files import getGroupFolder [as 別名]
 def deleteSelf(self):
   log.group(type(self),self.ID,"deleting itself")
   log.group("Deregistering self")
   groupDeregister(self)
   log.group("Deleting Folder")
   Files.deleteFolder(Files.getGroupFolder(self))
開發者ID:civilwargeeky,項目名稱:GroupMeServer3,代碼行數:8,代碼來源:Groups.py

示例4: getFileName

# 需要導入模塊: import Files [as 別名]
# 或者: from Files import getGroupFolder [as 別名]
 def getFileName(self):
   if not self.ID: log.error("Attempted to get file name for unloaded or unset user")
   return Files.getFileName(Files.join(Files.getGroupFolder(self.group), "Users", self.ID or "DEFAULT_USER"))
開發者ID:civilwargeeky,項目名稱:GroupMeServer3,代碼行數:5,代碼來源:Users.py


注:本文中的Files.getGroupFolder方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。