Skip to content

Powershell replacement for Get-ChildItem that utilizes multi-threading to achieve faster results than the default Get-ChildItem

License

Notifications You must be signed in to change notification settings

nathanaelries/gci-AsParallel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

How It Works

  1. Parameter Handling:
    The function accepts one or more paths (via the -Path parameter or through the pipeline). It also accepts a -Recurse switch to control whether subdirectories are searched.

  2. Input Validation:
    Each provided path is checked with Test-Path. If a path does not exist, a warning is emitted and that path is skipped.

  3. Parallel Enumeration:
    For each valid path, a [System.IO.DirectoryInfo] object is created. The directories and files are enumerated using EnumerateDirectories and EnumerateFiles respectively, then converted into a parallel query using AsParallel.

  4. Output:
    The function concatenates the directories and files found and outputs them as a single collection.

About

Powershell replacement for Get-ChildItem that utilizes multi-threading to achieve faster results than the default Get-ChildItem

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published