pymensago/workspace.py
def add_folder(self, folder: FolderMap) -> RetVal:
		'''
		Adds a mapping of a folder ID to a specific path in the workspace.
		Parameters:
		folder : FolderMap object
		'''
		cursor = self.db.cursor()
		cursor.execute("SELECT fid FROM folders WHERE fid=?", (folder.fid,))
		results = cursor.fetchone()
		if results:
			return RetVal(ErrExists, folder.fid)
		
		cursor.execute('''INSERT INTO folders(fid,address,keyid,path,name,permissions)
			VALUES(?,?,?,?,?,?)''', (folder.fid, folder.address, folder.keyid, folder.path.path,
				folder.path.basename(), folder.permissions))
		self.db.commit()
		return RetVal()

		Adds a mapping of a folder ID to a specific path in the workspace.
		Parameters:
		folder : FolderMap object
		
Adds a mapping of a folder ID to a specific path in the workspace.
Parameters:
folder : FolderMap object
Adds a mapping of a folder ID to a specific path in the workspace . Parameters : folder : FolderMap object
def add_folder(self, folder: FolderMap) -> RetVal:
		cursor = self.db.cursor()
		cursor.execute("SELECT fid FROM folders WHERE fid=?", (folder.fid,))
		results = cursor.fetchone()
		if results:
			return RetVal(ErrExists, folder.fid)
		cursor.execute('''INSERT INTO folders(fid,address,keyid,path,name,permissions)
			VALUES(?,?,?,?,?,?)''', (folder.fid, folder.address, folder.keyid, folder.path.path,
				folder.path.basename(), folder.permissions))
		self.db.commit()
		return RetVal()
def add_folder ( self , folder : FolderMap ) -> RetVal : cursor = self . db . cursor ( ) cursor . execute ( "SELECT fid FROM folders WHERE fid=?" , ( folder . fid , ) ) results = cursor . fetchone ( ) if results : return RetVal ( ErrExists , folder . fid ) cursor . execute ( '''INSERT INTO folders(fid,address,keyid,path,name,permissions)
			VALUES(?,?,?,?,?,?)''' , ( folder . fid , folder . address , folder . keyid , folder . path . path , folder . path . basename ( ) , folder . permissions ) ) self . db . commit ( ) return RetVal ( )
Adds a mapping of a folder ID to a specific path in the workspace.
Adds a mapping of a folder ID to a specific path in the workspace .
'''
		Adds a mapping of a folder ID to a specific path in the workspace.
		Parameters:
		folder : FolderMap object
		'''
self
folder
FolderMap