// 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 /> /// //EPIC BEGIN [System.Diagnostics.CodeAnalysis.SuppressMessage("Interoperability", "CA1419:Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle'", Justification = "")] //EPIC END internal sealed class SafeFindFileHandle : SafeHandleZeroOrMinusOneIsInvalid { /// /// Private constructor for the PInvoke marshaller. /// private SafeFindFileHandle() : base(ownsHandle: true) { } /// protected override bool ReleaseHandle() { return WindowsNative.FindClose(handle); } } }