function Show-Tree {
param(
[Parameter(Mandatory=$false)]
[string]$Path = (Get-Location).Path,
[string]$Indent = ""
)
# Add more as needed
$excludeDirs = @('node_modules', '__pycache__', 'venv')
$directories = Get-ChildItem -Path $Path -Directory | Where-Object { $excludeDirs -notcontains $_.Name }
$files = Get-ChildItem -Path $Path -File
foreach ($file in $files) {
"$Indent$file"
}
foreach ($directory in $directories) {
"$Indent$($directory.Name)/"
Show-Tree -Path $directory.FullName -Indent "$Indent "
}
}
Comments
0 B
|👍
/👎
0 B
|👍
/👎