This commit is contained in:
master
2026-02-04 19:59:20 +02:00
parent 557feefdc3
commit 5548cf83bf
1479 changed files with 53557 additions and 40339 deletions

View File

@@ -0,0 +1,26 @@
namespace StellaOps.AirGap.Bundle.Services;
public sealed partial class SnapshotBundleWriter
{
private string CreateTempDir()
{
var tempDir = Path.Combine(Path.GetTempPath(), $"snapshot-{_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.
}
}
}