mirror of
https://github.com/Grace-Solutions/PSMinIO.git
synced 2026-07-26 14:58:13 +00:00
f420effc84
✅ ZipArchiveBuilder - Core compression engine: • Built on System.IO.Compression (.NET Standard 2.0 built-in) • Real-time progress tracking with events • Start/end time tracking with duration calculation • Size metrics (compressed/uncompressed) and compression ratios • FileSystemInfo support (FileInfo, DirectoryInfo) • Append support via ZipArchiveMode.Update • Compression efficiency calculations ✅ ZipBuilder - PowerShell integration layer: • ThreadSafeProgressCollector integration • Multi-layer progress tracking (Zip + File levels) • Verbose logging with comprehensive metrics • ZipCreationResult object for PowerShell output • Event-driven progress reporting ✅ New-MinIOZipArchive cmdlet - Well-structured PowerShell interface: • Files parameter set: FileInfo[] support for multiple files • Directory parameter set: DirectoryInfo with recursive options • File filtering: InclusionFilter/ExclusionFilter ScriptBlocks • Compression levels: Optimal, Fastest, NoCompression • Archive modes: Create, Update (for appending) • BasePath parameter for custom entry name control • Force parameter for overwriting existing archives • PassThru parameter for detailed result objects ✅ Advanced features: • Progress tracking: Real-time speed and ETA calculations • Metrics: Compression ratio, space saved, processing time • File filtering: ScriptBlock-based inclusion/exclusion • Path handling: Cross-platform compatibility • Error handling: Comprehensive validation and recovery • Memory efficiency: 80KB buffer for optimal throughput ✅ Integration benefits: • No external dependencies (uses built-in .NET compression) • Thread-safe operations compatible with PSMinIO architecture • Consistent with existing progress tracking patterns • Minimal footprint aligning with project preferences • Enterprise-grade functionality with comprehensive metrics Architecture: Built on System.IO.Compression with custom progress tracking, providing superior zip functionality with PowerShell-native integration.
30 lines
1.6 KiB
PowerShell
30 lines
1.6 KiB
PowerShell
# Check what parameters are available for New-MinIOObject
|
|
Import-Module ".\Module\PSMinIO\PSMinIO.psd1" -Force
|
|
|
|
Write-Host "=== New-MinIOObject Parameter Information ===" -ForegroundColor Cyan
|
|
|
|
# Get command info
|
|
$cmdInfo = Get-Command New-MinIOObject
|
|
|
|
Write-Host "`nParameter Sets:" -ForegroundColor Yellow
|
|
foreach ($paramSet in $cmdInfo.ParameterSets) {
|
|
Write-Host " $($paramSet.Name):" -ForegroundColor Green
|
|
foreach ($param in $paramSet.Parameters) {
|
|
if ($param.Name -notin @('Verbose', 'Debug', 'ErrorAction', 'WarningAction', 'InformationAction', 'ErrorVariable', 'WarningVariable', 'InformationVariable', 'OutVariable', 'OutBuffer', 'PipelineVariable', 'WhatIf', 'Confirm')) {
|
|
$mandatory = if ($param.IsMandatory) { " (Mandatory)" } else { "" }
|
|
$aliases = if ($param.Aliases.Count -gt 0) { " [Aliases: $($param.Aliases -join ', ')]" } else { "" }
|
|
Write-Host " - $($param.Name)$mandatory$aliases" -ForegroundColor White
|
|
}
|
|
}
|
|
Write-Host ""
|
|
}
|
|
|
|
Write-Host "All Parameters:" -ForegroundColor Yellow
|
|
foreach ($param in $cmdInfo.Parameters.Values) {
|
|
if ($param.Name -notin @('Verbose', 'Debug', 'ErrorAction', 'WarningAction', 'InformationAction', 'ErrorVariable', 'WarningVariable', 'InformationVariable', 'OutVariable', 'OutBuffer', 'PipelineVariable', 'WhatIf', 'Confirm')) {
|
|
$aliases = if ($param.Aliases.Count -gt 0) { " [Aliases: $($param.Aliases -join ', ')]" } else { "" }
|
|
$paramSets = $param.ParameterSets.Keys -join ', '
|
|
Write-Host " $($param.Name)$aliases - Sets: $paramSets" -ForegroundColor White
|
|
}
|
|
}
|