Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Establish a known, cross-platform ordering of output from Get-ChildItem and provide a parameter to opt out of sorting #15476

@rjmholt

Description

@rjmholt

Summary of the new feature/enhancement

From #15304.

Get-ChildItem should provide output in a consistent ordering across platforms if possible, and if implemented should add a switch to opt out of the overhead of sorting.

One important question around this ordering is whether it should be case-sensitive or not across platforms. Currently it is sorted with CurrentCultureIgnoreCase:

// On some systems, this is already sorted. For consistency, always sort again.
IEnumerable<FileSystemInfo> sortedChildList = childList.OrderBy(c => c.Name, StringComparer.CurrentCultureIgnoreCase);

However, it may be desirable on *nix platforms or on case-sensitive filesystems to make the ordering discern case-sensitivity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-FileSystem-Providerspecific to the FileSystem providerIssue-Enhancementthe issue is more of a feature request than a bugNeeds-TriageThe issue is new and needs to be triaged by a work group.Resolution-DeclinedThe proposed feature is declined.WG-Cmdletsgeneral cmdlet issuesWG-Cmdlets-Managementcmdlets in the Microsoft.PowerShell.Management module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions