A Go application that creates a visual tree map of a file structure based on PowerShell's Get-ChildItem -Recurse -Force output or GitHub Actions logs.
Generate a visual tree structure and exit:
# From PowerShell
Get-ChildItem -Recurse -Force | go run main.go -out=true
# From a saved file
Get-Content example.txt | go run main.go -out=true
# From GitHub Actions logs starting at line 370
Get-Content github-actions-log.txt | go run main.go -start 370 -out=1When -out is not provided, the program enters interactive mode where you can search for files:
Get-Content example.txt | go run main.goIn interactive mode you can:
-
Check if a full path exists: Enter a complete file path to get
trueorfalse> D:\a\project\.sonarqube\bin\Newtonsoft.Json.dll true -
Search for a filename: Enter just a filename to find all matching paths
> Newtonsoft.Json.dll Found 1 occurrence(s): D:\a\project\.sonarqube\bin\Newtonsoft.Json.dll -
Type
exitorquitto exit interactive mode
The tool automatically detects and strips GitHub Actions timestamps. You can specify a starting line number to skip irrelevant content:
# Process entire log
Get-Content github-actions-log.txt | go run main.go
# Start reading from line 370
Get-Content github-actions-log.txt | go run main.go -start 370The program will automatically stop reading when it detects the directory blocks have ended (after 10 consecutive non-matching lines).
go build -o filesystemdraw.exe main.goThen use:
# Tree output mode
Get-ChildItem -Recurse -Force | .\filesystemdraw.exe -out=true
# Interactive search mode
Get-Content log.txt | .\filesystemdraw.exe
# With GitHub Actions log starting from a specific line
Get-Content log.txt | .\filesystemdraw.exe -start 370 -out=1- Parses standard PowerShell
Get-ChildItem -Recurse -Forceoutput - Automatically handles GitHub Actions log format (strips timestamps)
- Start reading from a specific line with
-startflag - Auto-detects end of directory listings
- Two modes of operation:
- Tree output mode (
-outflag): Creates visual tree structure with box-drawing characters - Interactive search mode (default): Search for files by full path or filename
- Tree output mode (
- Case-insensitive file path matching
- Handles both files and directories
-start <line_number>: Start reading from the specified line number (default: 0)-out <value>: Output the tree structure and exit. Any non-empty value enables this mode
D:\a\program
├── .sonarqube
│ ├── bin
│ │ ├── targets
│ │ │ └── SonarQube.Integration.targets
│ │ ├── Newtonsoft.Json.dll
│ │ ├── SonarScanner.MSBuild.Common.dll
│ │ └── SonarScanner.MSBuild.Tasks.dll
│ ├── conf
│ └── out
├── coverage-reports
├── merged-coverage
├── trx-reports
└── src