Beispiel #1
0
        public static void DeleteInactiveBuilds(ModProfile profile)
        {
            string buildDir = CacheClient.GenerateModBuildsDirectoryPath(profile.id);

            string[] buildFilePaths = Directory.GetFiles(buildDir, "*.*");

            foreach (string buildFile in buildFilePaths)
            {
                if (Path.GetFileNameWithoutExtension(buildFile)
                    != profile.activeBuild.id.ToString())
                {
                    CacheClient.DeleteFile(buildFile);
                }
            }
        }
Beispiel #2
0
 public static void DeleteUserProfile(int userId)
 {
     CacheClient.DeleteFile(CacheClient.GenerateUserProfileFilePath(userId));
 }
Beispiel #3
0
 public static void DeleteModTeam(int modId)
 {
     CacheClient.DeleteFile(CacheClient.GenerateModTeamFilePath(modId));
 }
Beispiel #4
0
 public static void DeleteModfileAndBinaryZip(int modId, int modfileId)
 {
     CacheClient.DeleteFile(CacheClient.GenerateModfileFilePath(modId, modfileId));
     CacheClient.DeleteFile(CacheClient.GenerateModBinaryZipFilePath(modId, modfileId));
 }