Skip to content

FindFirstFileName and FindNextFileName are available in NanoServer and IoT now, so we should enable the usage of them in powershell core #2349

Closed

Description

There are 2 issues to address here

  • 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.

Activity

  1. added
    Issue-Enhancement
    WG-Engine
    on Sep 23, 2016
  2. added
    Up-for-Grabs
    on Nov 4, 2016
  3. SteveL-MSFT commented on Nov 4, 2016

    @SteveL-MSFT
    Member

    It appears that this will enable retrieving file attributes if a file is in use.

    PS C:\> dir -Hidden .\pagefile.sys
    
    
        Directory: C:\
    
    
    Mode                LastWriteTime         Length Name
    ----                -------------         ------ ----
                  11/2/2016   5:46 PM     5637144576 pagefile.sys

    Expected is Mode column has attribute information

  4. iSazonov commented on Aug 30, 2018

    @iSazonov
    Collaborator

    Dongbo Wang (@daxian-dbw) I reviewed point one and debug for windows reparse points (symlink and mount point) - this works well and we get ETS Target property for FileSystemInfo objects. So the code with FindFirstFileName (currently disabled) looks unnecessary. I think we could remove it. Do I skip something?

  5. iSazonov commented on Sep 8, 2018

    @iSazonov
    Collaborator

    Dongbo Wang (@daxian-dbw) Could you please look my previous comment? Seems we could remove the dead code.

  6. daxian-dbw commented on Sep 10, 2018

    @daxian-dbw
    MemberAuthor

    Ilya (@iSazonov) Will look at the uses of those native APIs again.

  7. iSazonov commented on Sep 29, 2019

    @iSazonov
    Collaborator
  8. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  9. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  10. added
    Resolution-No Activity
    on Nov 16, 2023
  11. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  12. microsoft-github-policy-service commented on Nov 23, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-EnhancementResolution-No ActivityUp-for-GrabsWG-Engine

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions