private string ServerMapFolder(string resourceType, string folderPath) { string path = Path.Combine(base.UserFilesDirectory, resourceType); PEUtil.CreateDirectory(path); return(Path.Combine(path, folderPath.TrimStart(new char[] { '/' }))); }
private void CreateFolder(XmlNode connectorNode, string resourceType, string currentFolder) { string attributeValue = "0"; string str2 = base.Request.QueryString["NewFolderName"]; if ((str2 == null) || (str2.Length == 0)) { attributeValue = "102"; } else { string str3 = this.ServerMapFolder(resourceType, currentFolder); try { PEUtil.CreateDirectory(Path.Combine(str3, str2)); } catch (ArgumentException) { attributeValue = "102"; } catch (PathTooLongException) { attributeValue = "102"; } catch (IOException) { attributeValue = "101"; } catch (SecurityException) { attributeValue = "103"; } catch (Exception) { attributeValue = "110"; } } XmlUtil.SetAttribute(XmlUtil.AppendElement(connectorNode, "Error"), "number", attributeValue); }