// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Microsoft.Win32.SafeHandles;
#nullable disable
namespace Microsoft.Build.Shared.FileSystem
{
/// <summary>
/// Handle for a volume iteration as returned by WindowsNative.FindFirstVolumeW />
/// </summary>
internal sealed class SafeFindFileHandle : SafeHandleZeroOrMinusOneIsInvalid
{
/// <summary>
/// Private constructor for the PInvoke marshaller.
/// </summary>
private SafeFindFileHandle()
: base(ownsHandle: true)
{
}
/// <nodoc/>
protected override bool ReleaseHandle()
{
return WindowsNative.FindClose(handle);
}
}
}
|