public void CleanUp() { InstallText.text = ("Bezig met opruimen van tijdelijke bestanden"); foreach (string F in Files) { DeleteTempFiles(F); } if (Directory.GetFiles(TempSavePath).Length == 0) // Deletes only when folder is empty { DeleteTempFolder(); } else { SpecialScripts.SpecialUsernameRules(); } }
IEnumerator StartUnzip() { string ZipToUnpack = StartUrl; string TargetDir = Browser.Savefolder; WaitForSeconds wait = new WaitForSeconds(0.00f); int file = 1; Debug.Log(StartUrl + " this is the unzip start"); using (ZipFile zip = ZipFile.Read(ZipToUnpack)) { Debug.Log(zip.Count); foreach (ZipEntry e in zip) { e.Extract(TargetDir, ExtractExistingFileAction.DoNotOverwrite); InstallText.text = ("Bezig met installeren van bestand " + file + " van de " + zip.Count); ProgressBar.value = ((file * 100 / zip.Count)); ProgressPerCent.text = (ProgressBar.value.ToString() + " %"); file++; yield return(wait); } } SpecialScripts.SpecialUsernameRules(); }