From: Edward Delaporte Date: Tue, 13 Apr 2021 15:40:29 +0000 (-0500) Subject: Merge branch 'master' of github.com:edthedev/dotfiles X-Git-Url: https://apps.delaporte.us/gitweb/dotfiles.git/commitdiff_plain/7ff518f6e0e90613f7075d82ee48f4443f238a26?hp=e97b1b0105b0be8dd78463bd893b6230c11dd7f8 Merge branch 'master' of github.com:edthedev/dotfiles --- diff --git a/psmodules/drivespace.psm1 b/psmodules/drivespace.psm1 index 47527c3..fc5c011 100644 --- a/psmodules/drivespace.psm1 +++ b/psmodules/drivespace.psm1 @@ -21,5 +21,22 @@ 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