polylines tooltip content

This commit is contained in:
ISA
2024-08-10 10:32:37 +02:00
parent b1f7b700ca
commit b7116a1e6f
142 changed files with 14451 additions and 4281 deletions

42
tree_included.ps1 Normal file
View File

@@ -0,0 +1,42 @@
param (
[string]$Path,
[string[]]$Include
)
function Get-IncludedTree {
param (
[string]$Directory,
[string[]]$Include,
[int]$Indent = 0
)
# Check if the current directory should be included
$includeCurrent = $false
foreach ($include in $Include) {
if ($Directory -like "*\$include*") {
$includeCurrent = $true
break
}
}
if ($includeCurrent) {
# Output the current directory with indentation
Write-Host (" " * $Indent) + "+---" + (Split-Path -Leaf $Directory)
# Process subdirectories and files
Get-ChildItem -Path $Directory | ForEach-Object {
if ($_.PSIsContainer) {
Get-IncludedTree -Directory $_.FullName -Include $Include -Indent ($Indent + 4)
} else {
Write-Host (" " * ($Indent + 4)) + "+---" + $_.Name
}
}
}
}
# Start processing from the given path
Write-Host "Starting at path: $Path"
Get-ChildItem -Path $Path -Directory | ForEach-Object {
Get-IncludedTree -Directory $_.FullName -Include $Include
}
Write-Host "Processing completed."