Ejemplo n.º 1
0
        public static void DeleteExtraDirectories(string parent, ArrayList keepers)
        {
            if (!Directory.Exists(parent)) // just in case. avoid crash.
            {
                return;
            }

            string[] installed = Directory.GetDirectories(parent);

            foreach (string dirFullPath in installed)
            {
                if (SluggedItem.DirectoryIsDeletable(dirFullPath, keepers))
                {
                    GM.Instance.logger.Info("deleting " + dirFullPath);
                    Directory.Delete(dirFullPath, true);
                }
            }
        }