parameters: (self, resourceType, currentFolder)
return_statement: return self.sendErrorNode ( errorNo, errorMsg )
docstring: Purpose: command to create a new folder
docstring_summary: Purpose: command to create a new folder
docstring_tokens: Purpose : command to create a new folder
function: def createFolder(self, resourceType, currentFolder):
  		"""
  		Purpose: command to create a new folder
  		"""
  		errorNo = 0; errorMsg ='';
  		if self.request.has_key("NewFolderName"):
  			newFolder = self.request.get("NewFolderName", None)
  			newFolder = sanitizeFolderName (newFolder)
  			try:
  				newFolderPath = mapServerFolder(self.userFilesFolder, combinePaths(currentFolder, newFolder))
  				self.createServerFolder(newFolderPath)
  			except Exception, e:
  				errorMsg = str(e).decode('iso-8859-1').encode('utf-8') # warning with encodigns!!!
  				if hasattr(e,'errno'):
  					if e.errno==17: #file already exists
  						errorNo=0
  					elif e.errno==13: # permission denied
  						errorNo = 103
  					elif e.errno==36 or e.errno==2 or e.errno==22: # filename too long / no such file / invalid name
  						errorNo = 102
  				else:
  					errorNo = 110
  		else:
  			errorNo = 102
  		return self.sendErrorNode ( errorNo, errorMsg )
function_tokens: def createFolder ( self , resourceType , currentFolder ) : errorNo = 0 errorMsg = '' if self . request . has_key ( "NewFolderName" ) : newFolder = self . request . get ( "NewFolderName" , None ) newFolder = sanitizeFolderName ( newFolder ) try : newFolderPath = mapServerFolder ( self . userFilesFolder , combinePaths ( currentFolder , newFolder ) ) self . createServerFolder ( newFolderPath ) except Exception , e : errorMsg = str ( e ) . decode ( 'iso-8859-1' ) . encode ( 'utf-8' ) # warning with encodigns!!! if hasattr ( e , 'errno' ) : if e . errno == 17 : #file already exists errorNo = 0 elif e . errno == 13 : # permission denied errorNo = 103 elif e . errno == 36 or e . errno == 2 or e . errno == 22 : # filename too long / no such file / invalid name errorNo = 102 else : errorNo = 110 else : errorNo = 102 return self . sendErrorNode ( errorNo , errorMsg )