Public/Get-SpecFileTree.ps1
function Get-SpecFileTree { <# .SYNOPSIS Displays the file tree structure of a specified PowerShell module. .DESCRIPTION The Show-SpecFileTree function displays the file tree structure of a PowerShell module. It visualizes the organization of files and directories within the module's root directory. .PARAMETER moduleName Specifies the name of the module. .PARAMETER modulePath Specifies the path to the module's root directory. .EXAMPLE Show-SpecFileTree -moduleName "MyModule" -modulePath "C:\Path\To\Module" This example displays the file tree structure of a module named "MyModule" located at "C:\Path\To\Module". .NOTES Author : owen.heaume Version : 1.1 #> param ( [parameter(mandatory = $true)] [string]$moduleName, [parameter(mandatory = $true)] [string]$modulePath ) $tree = @( "$modulePath\$moduleName", "|- $moduleName", "| |-- en-US", "| | |-- about_$moduleName.help.txt", "| |", "| |-- Private", "| |-- Public", "| |-- $moduleName.psd1", "| |-- $moduleName.psm1", "|", "|-- Tests", "| |-- ${moduleName}.tests.ps1", "|", "|-- README.md" ) $tree | ForEach-Object { Write-Host $_ } } |