Files
git.stella-ops.org/src/AirGap/__Libraries/StellaOps.AirGap.Bundle/Services/SnapshotBundleReader.TempDir.cs
2026-02-04 19:59:20 +02:00

27 lines
616 B
C#

namespace StellaOps.AirGap.Bundle.Services;
public sealed partial class SnapshotBundleReader
{
private string CreateTempDir()
{
var tempDir = Path.Combine(Path.GetTempPath(), $"bundle-read-{_guidProvider.NewGuid():N}");
Directory.CreateDirectory(tempDir);
return tempDir;
}
private static void CleanupTempDir(string tempDir)
{
try
{
if (Directory.Exists(tempDir))
{
Directory.Delete(tempDir, recursive: true);
}
}
catch
{
// Ignore cleanup errors.
}
}
}