PowerShell / PowerShell/PowerShell-RFC
Get-ChildItem IncludeRoot Parameter
Nessuno ha ancora preso questa issue.
- Lingua principale
- PowerShell
- Stelle
- 467
- Fork
- 140
- Merge medio
- 9m
- PR unite (30g)
- 1
Descrizione
RFC:
Author: John Bevan
Status: Draft
SupercededBy:
Version:
Area: Standard Functions
Comments Due:
Plan to implement:
Get-ChildItem; Add IncludeRoot Switch
Suggestion: Currently if you wish to fetch an item and its children you have to make a call to Get-Item and Get-ChildItem. Since this is a common use case, it would be good to reduce this to a single call. By adding an IncludeRoot switch to Get-ChildItem we could easily have it fulfill this requirement.
Here are some examples of people who've hit this scenario & tried to get creative in resolving it.
Motivation
As a PowerShell user,
I can retrieve an item and its children,
so that I have the full tree returned in a single result set.
User Experience
Example of user experience with example code/script.
Include example of input and output.
Get-ChildItem -Path 'c:\demo' -IncludeRoot -Recurse | Select-Object -ExpandProperty FullName
c:\demo
c:\demo\subfolder
c:\demo\subfolder\one.txt
c:\demo\subfolder\two.txt
Specification
Include [Parameter()][Switch]$IncludeRoot in the list of available parameters.
Alternate Proposals and Considerations
The current workaround is to make separate calls to Get-Item and Get-ChildItem.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dal testo dell'RFC e dagli esempi collegati per comprendere il workflow Get-ChildItem richiesto. Esamina il comportamento attuale di -Recurse e il parametro IncludeRoot e l'output proposti. Il lavoro è completato quando il parametro, l'esempio di utilizzo, l'output e le considerazioni progettuali dell'RFC sono definiti abbastanza chiaramente da consentire l'implementazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- powershell
- Ambito
- cli
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100