mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-05-10 00:44:10 +08:00
27 lines
558 B
C#
27 lines
558 B
C#
using System;
|
|
using System.IO;
|
|
using BetterGenshinImpact.Core.Config;
|
|
|
|
namespace BetterGenshinImpact.Helpers;
|
|
|
|
public class TempManager
|
|
{
|
|
public static string GetTempDirectory()
|
|
{
|
|
var tmp = Global.Absolute("User/Temp");
|
|
Directory.CreateDirectory(tmp);
|
|
return tmp;
|
|
}
|
|
|
|
public static void CleanUp()
|
|
{
|
|
try
|
|
{
|
|
DirectoryHelper.DeleteDirectoryRecursively(GetTempDirectory());
|
|
}
|
|
catch
|
|
{
|
|
// Suppress any exceptions to avoid exposing errors
|
|
}
|
|
}
|
|
} |