public void EditProjectFolder(string oldProjectName, string newProjectName, string bundleIdentifier, EditProjectIcon icon)
        {
            string[] dirs      = System.IO.Directory.GetDirectories(rootPath);
            char[]   spearator = { '\\' };

            try
            {
                foreach (var dir in dirs)
                {
                    if (dir.Split(spearator)[1] == oldProjectName)
                    {
                        //Console.WriteLine("Edited :" + dir.Split(spearator)[1]);
                        EditProjectIcon(rootPath + "/" + oldProjectName, icon);
                        System.IO.Directory.Move(rootPath + "/" + oldProjectName, rootPath + "/" + newProjectName);
                        break;
                    }
                }
            }
            catch (Exception)
            {
                //Console.WriteLine("old and new project names are same");
                //  Console.WriteLine("icon "+icon.Icon.Length);
            }
            string[] categoryDirs = System.IO.Directory.GetDirectories(rootPath + "/" + newProjectName);
            foreach (var category in categoryDirs)
            {
                string[] appDirs = System.IO.Directory.GetDirectories(category);
                foreach (var app in appDirs)
                {
                    //Console.WriteLine(app);
                    string[] appFile = Directory.GetFiles(app, "*.ipa");
                    if (appFile.Length == 1)
                    {
                        string[] details = appFile[0].Split(spearator);
                        File.Delete(app + "/manifest.plist");
                        string ipaFilePath  = "";
                        string toBeSearched = "Main";
                        int    ix           = appFile[0].IndexOf(toBeSearched);
                        if (ix != -1)
                        {
                            ipaFilePath = ipaRootPath + appFile[0].Substring(ix + toBeSearched.Length);
                        }
                        string tempId = appFile[0].Substring(ix + toBeSearched.Length);
                        FileOperationLibrary.ManifestPlist manifest = new FileOperationLibrary.ManifestPlist();
                        manifest.CreateManifest(app.Replace('\\', '/'), ipaFilePath.Replace('\\', '/'), bundleIdentifier, Convert.ToString(tempId.Split(spearator)[2]), newProjectName);
                    }
                }
            }
        }
        public bool CreateApplicationFolder(int appId, string categoryName, string projectName, string fileName, string bundleIdentifier, ApplicationFile appFile)
        {
            string applicationPath = rootPath + "/" + projectName + "/" + categoryName + "/" + Convert.ToString(appId);
            string ipaPath         = ipaRootPath + "/" + projectName + "/" + categoryName + "/" + Convert.ToString(appId);

            // Console.WriteLine(applicationPath);
            CreateCategoryFolder(projectName, categoryName);
            if (FileExists(applicationPath) == false)
            {
                System.IO.Directory.CreateDirectory(applicationPath);
                if (UploadApplicationFile(applicationPath, appFile))
                {
                    FileOperationLibrary.ManifestPlist manifest = new FileOperationLibrary.ManifestPlist();
                    manifest.CreateManifest(applicationPath, ipaPath + "/" + appFile.File.FileName, bundleIdentifier, Convert.ToString(appId), projectName);
                }
                else
                {
                    // Console.WriteLine("file upload error");
                    return(false);
                }
                return(true);
            }
            return(false);
        }