29 references to WindowsNative
Microsoft.Build.Tasks.Core (29)
AssemblyDependency\AssemblyInformation.cs (1)
20
using static Microsoft.Build.Shared.FileSystem.
WindowsNative
;
SafeFileHandle.cs (1)
26
return
WindowsNative
.FindClose(handle);
WindowsFileSystem.cs (27)
108
!(result.Status ==
WindowsNative
.EnumerateDirectoryStatus.Success ||
109
result.Status ==
WindowsNative
.EnumerateDirectoryStatus.SearchDirectoryNotFound))
117
private static
WindowsNative
.EnumerateDirectoryResult CustomEnumerateDirectoryEntries(
126
WindowsNative
.Win32FindData findResult;
127
using (var findHandle =
WindowsNative
.FindFirstFileW(searchDirectoryPath, out findResult))
132
Debug.Assert(hr !=
WindowsNative
.ErrorFileNotFound);
133
WindowsNative
.EnumerateDirectoryStatus findHandleOpenStatus = hr switch
135
WindowsNative
.ErrorFileNotFound =>
WindowsNative
.EnumerateDirectoryStatus.SearchDirectoryNotFound,
136
WindowsNative
.ErrorPathNotFound =>
WindowsNative
.EnumerateDirectoryStatus.SearchDirectoryNotFound,
137
WindowsNative
.ErrorDirectory =>
WindowsNative
.EnumerateDirectoryStatus.CannotEnumerateFile,
138
WindowsNative
.ErrorAccessDenied =>
WindowsNative
.EnumerateDirectoryStatus.AccessDenied,
139
_ =>
WindowsNative
.EnumerateDirectoryStatus.UnknownError,
141
return new
WindowsNative
.EnumerateDirectoryResult(directoryPath, findHandleOpenStatus, hr);
155
WindowsNative
.PathMatchSpecExW(findResult.CFileName, pattern,
WindowsNative
.DwFlags.PmsfNormal) ==
156
WindowsNative
.ErrorSuccess)
182
if (!
WindowsNative
.FindNextFileW(findHandle, out findResult))
185
if (hr ==
WindowsNative
.ErrorNoMoreFiles)
188
return new
WindowsNative
.EnumerateDirectoryResult(
190
WindowsNative
.EnumerateDirectoryStatus.Success,
194
Debug.Assert(hr !=
WindowsNative
.ErrorSuccess);
195
return new
WindowsNative
.EnumerateDirectoryResult(
197
WindowsNative
.EnumerateDirectoryStatus.UnknownError,