You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The usage of FindFirstFileName and FindNextFileName is disabled in powershell core at https://github.com/PowerShell/PowerShell/blob/master/src/System.Management.Automation/namespaces/FileSystemProvider.cs#L7928. Now they are available in NanoServer and IoT in the API set api-ms-win-core-file-l1-2-2, so maybe now it's the time to enable them in powershell core. Note that this API set is not available in .net core packages by default, so we basically need to verify if the kernel32 forwarder on NanoServer and IoT can correctly forward the call to the right API set.
(Fixed in Cleanup FileSystemProvider from runtime checks #7655) FileSystemProvider.cs needs to be refactored. I spot 2 things -- (1) GetTarget and InternalGetTarget needs to be refactored as Platform.NonWindowsInternalGetTarget won't be reached at all. (2) runtime checks should be converted to compilation time checks as much as possible.
There are 2 issues to address here
FindFirstFileNameandFindNextFileNameis disabled in powershell core at https://github.com/PowerShell/PowerShell/blob/master/src/System.Management.Automation/namespaces/FileSystemProvider.cs#L7928. Now they are available in NanoServer and IoT in the API setapi-ms-win-core-file-l1-2-2, so maybe now it's the time to enable them in powershell core. Note that this API set is not available in .net core packages by default, so we basically need to verify if thekernel32forwarder on NanoServer and IoT can correctly forward the call to the right API set.FileSystemProvider.csneeds to be refactored. I spot 2 things -- (1)GetTargetandInternalGetTargetneeds to be refactored asPlatform.NonWindowsInternalGetTargetwon't be reached at all. (2) runtime checks should be converted to compilation time checks as much as possible.