protected override void ExecuteAdd(ModuleService moduleService)
{
string rootFolder = this.resource["RootFolder"].ToString();
if (rootFolder == "")
{
rootFolder = "c:\\ProvisioningModuleTestFolder\\";
}
if (rootFolder.Substring(rootFolder.Length - 1, 1) != "\\")
{
rootFolder += "\\";
}
string newFolderName = moduleService["Name"].ToString();
if (!Directory.Exists(rootFolder))
{
Directory.CreateDirectory(rootFolder);
}
string newFolderFullPath = rootFolder + newFolderName;
if (Directory.Exists(newFolderFullPath))
{
throw ExceptionHelper.GetModuleException("ID422008", null, null);
}
else
{
Directory.CreateDirectory(newFolderFullPath);
}
}