comment out unused funcs

This commit is contained in:
2024-06-17 16:48:50 -04:00
parent 427e694fb3
commit 05da2d726e
+31 -31
View File
@@ -835,37 +835,37 @@ Function Test-RegistryProperty {
Catch { Return $false }
}
# Function to format a quantity of bytes into a denomination
Function Format-ByteQuantity {
param(
[int64]$TotalBytes,
[int]$Precision=2,
[string]$Units,
[switch]$WithUnitLabel
)
Switch ( $Units.ToUpper() ) {
"KB" { $UnitLabel = "KB" ; $Divisor = 1KB }
"MB" { $UnitLabel = "MB" ; $Divisor = 1MB }
"GB" { $UnitLabel = "GB" ; $Divisor = 1GB }
"TB" { $UnitLabel = "TB" ; $Divisor = 1TB }
default { $UnitLabel = "bytes" ; $Divisor = 1 }
}
Switch ( $WithUnitLabel ) {
$true { Return (ZeroPad-Decimal -Amount $([Math]::Round($TotalBytes / $Divisor,$Precision)) -NeededDecimalPlaces $Precision) + "${UnitLabel}" }
$false { Return (ZeroPad-Decimal -Amount $([Math]::Round($TotalBytes / $Divisor,$Precision)) -NeededDecimalPlaces $Precision) }
}
}
# Function to pad zeros onto the end of a decimal number
Function ZeroPad-Decimal {
param(
$Amount,
$NeededDecimalPlaces
)
$splitNumbers = $Amount.ToString().Split('.')
$paddedDecimal = $splitNumbers[1].PadRight($NeededDecimalPlaces, '0')
Return $splitNumbers[0] + '.' + $paddedDecimal
}
## Function to format a quantity of bytes into a denomination
#Function Format-ByteQuantity {
# param(
# [int64]$TotalBytes,
# [int]$Precision=2,
# [string]$Units,
# [switch]$WithUnitLabel
# )
# Switch ( $Units.ToUpper() ) {
# "KB" { $UnitLabel = "KB" ; $Divisor = 1KB }
# "MB" { $UnitLabel = "MB" ; $Divisor = 1MB }
# "GB" { $UnitLabel = "GB" ; $Divisor = 1GB }
# "TB" { $UnitLabel = "TB" ; $Divisor = 1TB }
# default { $UnitLabel = "bytes" ; $Divisor = 1 }
# }
# Switch ( $WithUnitLabel ) {
# $true { Return (ZeroPad-Decimal -Amount $([Math]::Round($TotalBytes / $Divisor,$Precision)) -NeededDecimalPlaces $Precision) + "${UnitLabel}" }
# $false { Return (ZeroPad-Decimal -Amount $([Math]::Round($TotalBytes / $Divisor,$Precision)) -NeededDecimalPlaces $Precision) }
# }
#}
#
## Function to pad zeros onto the end of a decimal number
#Function ZeroPad-Decimal {
# param(
# $Amount,
# $NeededDecimalPlaces
# )
# $splitNumbers = $Amount.ToString().Split('.')
# $paddedDecimal = $splitNumbers[1].PadRight($NeededDecimalPlaces, '0')
# Return $splitNumbers[0] + '.' + $paddedDecimal
#}
# Function to follow a URL and return the absolute URI of the result (whether redirected or not)
Function Get-AbsoluteURI {