Skip to content

godsfromthemachine/garuda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tree Viewer

A directory tree viewer implemented in Zig that replicates the functionality of PowerShell's tree command.

Project Structure

src/
├── main.zig          # Application entry point and coordination
├── tree_formatter.zig # Tree formatting and display logic
└── dir_utils.zig     # Directory operations and entry sorting utilities

Component Responsibilities

  1. main.zig

    • Program entry point
    • Command-line argument handling
    • Initialization of components
  2. tree_formatter.zig

    • Tree visualization logic
    • Output formatting
    • Directory traversal coordination
  3. dir_utils.zig

    • Directory listing functionality
    • File/directory sorting
    • Hidden file detection

Building and Running

# Build the project
zig build

# Run with current directory
zig build run

# Run with specific directory
zig build run -- /path/to/directory

Features

  • Displays directory structure in tree format
  • Handles hidden files and directories
  • Sorts entries (directories first, then alphabetically)
  • Provides clear error messages for inaccessible directories
  • Matches PowerShell's tree command output format

About

directory tree viewer in Zig that replicates the functionality of PowerShell's tree command

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages