// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Microsoft.Win32.SafeHandles;
namespace Microsoft.Build.Shared.FileSystem
{
///
/// Handle for a volume iteration as returned by WindowsNative.FindFirstVolumeW />
///
internal sealed class SafeFindFileHandle : SafeHandleZeroOrMinusOneIsInvalid
{
///
/// Private constructor for the PInvoke marshaller.
///
private SafeFindFileHandle()
: base(ownsHandle: true)
{
}
///
protected override bool ReleaseHandle()
{
return WindowsNative.FindClose(handle);
}
}
}