]> us-delaporte.pagekite.me Git - dotfiles.git/commitdiff
Merge.
authorEdTheDev <edward@delaporte.us>
Mon, 17 May 2021 03:52:19 +0000 (22:52 -0500)
committerEdTheDev <edward@delaporte.us>
Mon, 17 May 2021 03:52:19 +0000 (22:52 -0500)
1  2 
Microsoft.PowerShell_profile.ps1
psmodules/drivespace.psm1

Simple merge
index 59feb96d962c377038de904e7a1c58eb8f3fb4f3,361ee23d6eda38ba78afd264685f5804f85ec5a5..19fdc5e5b6648efb75c1737e5eb6547c5209f30c
@@@ -21,6 -21,22 +21,21 @@@ function Show-Drivespace() 
        }
  }
  
+ function Show-DrivespacePretty() {
+       Start-Job -Name "FileCollection" -ScriptBlock { Show-Drivespace }
+ While((Get-Job -Name "FileCollection").State -eq "Running") {
+            Write-Progress -Activity "Collecting Files..." -PercentComplete $x
+       If($x -eq 100){
+               $x = 1
+       }
+       Else{
+               $x += 1
+       }
+ }
+ Write-Progress -Activity "Collecting Files..." -Completed
+ $Files = Get-Job -Name "FileCollection" | Receive-Job
+ Get-Job -Name "FileCollection" | Remove-Job
+ }
  
  Export-ModuleMember -Function Show-Drivespace 
 -Export-ModuleMember -Function Show-DrivespacePretty
  Export-ModuleMember -Function Show-LargeFiles