33 lines
681 B
C#
33 lines
681 B
C#
using System;
|
|
using System.IO;
|
|
|
|
namespace StellaOps.Scanner.Worker.Processing.Replay;
|
|
|
|
/// <summary>
|
|
/// Represents a fetched replay bundle mounted on the local filesystem.
|
|
/// </summary>
|
|
public sealed class ReplayBundleMount : IDisposable
|
|
{
|
|
public ReplayBundleMount(string bundlePath)
|
|
{
|
|
BundlePath = bundlePath ?? throw new ArgumentNullException(nameof(bundlePath));
|
|
}
|
|
|
|
public string BundlePath { get; }
|
|
|
|
public void Dispose()
|
|
{
|
|
try
|
|
{
|
|
if (File.Exists(BundlePath))
|
|
{
|
|
File.Delete(BundlePath);
|
|
}
|
|
}
|
|
catch
|
|
{
|
|
// best-effort cleanup
|
|
}
|
|
}
|
|
}
|