Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LowTree

A lightning-fast, lightweight directory scanner built in pure C for Windows.

LowTree analyzes your storage using the native Win32 API, providing a clean, terminal-based summary of folder sizes and file counts. It is designed to be highly efficient, bypassing common system pitfalls like symbolic link loops and minimizing unnecessary overhead.

Features

  • Native Performance: Built with C11 and the Win32 API for maximum speed and minimal memory footprint.
  • Clean CLI: Simple command-line interface with support for specific target paths, help menus, and versioning.
  • Accurate Sizing: Recursively calculates true folder sizes (dynamically formatting to MB or GB) and total file counts.
  • Safe Traversal: Automatically ignores Junction Points and System Symlinks to prevent infinite scanning loops.
  • Unicode Support: Fully handles wide characters (wchar_t) to correctly process complex Windows paths.

Prerequisites

To compile LowTree, you need a modern C toolchain for Windows. The recommended setup uses MSYS2 with the UCRT64 environment.

Ensure you have the following packages installed in your MSYS2 terminal:

pacman -S mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-ninja

Building the Project

  1. Open your UCRT64 terminal and navigate to the project directory:
    cd path/to/LowTree
  2. Create a build directory and enter it:
    mkdir build && cd build
  3. Generate the build files using CMake and Ninja:
    cmake -G Ninja ..
  4. Compile the executable:
    ninja

Usage

Run the compiled executable from your terminal. If no path is provided, LowTree defaults to scanning the C:\ root directory.

Scan the default drive:

.\LowTree.exe

Scan a specific directory: (Note: Always use quotes if your target path contains spaces).

.\LowTree.exe "C:\Users\YourUser\Desktop"
.\LowTree.exe "D:\Projects"

CLI Options:

  • -h, --help : Show the help message and usage examples.
  • -v, --version : Display the current software version.

Project Structure

LowTree is designed to be modular and easily extensible:

  • src/main.c: CLI argument parsing and main entry point.
  • src/lowtree.c: Core scanning engine using FindFirstFileW and recursive traversal logic.
  • include/lowtree.h: Public API declarations.
  • CMakeLists.txt: Build configuration.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages