#macos #size #folder #directory #cache #finder #performance

bin+lib dx-cli

faster dx with obj c ffi bindings

7 releases

new 0.3.1 May 28, 2024
0.2.0 Jan 16, 2024
0.1.5 Jan 2, 2024

#11 in #finder

Download history 1/week @ 2024-02-13 6/week @ 2024-02-20 6/week @ 2024-03-26 30/week @ 2024-04-02

383 downloads per month

MIT license

54KB
1.5K SLoC

Rust 1K SLoC // 0.1% comments C 229 SLoC // 0.1% comments Objective-C 90 SLoC // 0.1% comments

fast directory sizing on OSX, using reverse engineered finder cache api

Overview

dx leverages the obscure macOS C Finder cache to rapidly get folder sizes. Built in Rust, this utility integrates Objective C via Foreign Function Interface (FFI). Experience folder sizing at speeds up to 20x faster than traditional methods like du -sh.

output

Features

  • Efficient Sizing: Utilizes macOS Finder cache for ultra-fast folder size computation.
  • Rust and Objective C Integration: Seamlessly integrates Rust with Objective C using FFI.
  • Multiple Methods: if you dont want any cache you can still run dx with --live and get a recursive sizing
  • Performance: Outperforms du -sh by up to 20x in speed.
  • User-Friendly Defaults: Provides more intuitive defaults compared to traditional methods.

Installation

cargo install dx-cli

Usage

sane defaults:

  • dx dir is equivalent to du -sh dir
  • dx dir -l functions like du -h dir

Contributing

Contributions to dx are welcome! Whether it's bug reports, feature suggestions, or code contributions, your input is valuable. See CONTRIBUTING.md for guidelines on how to contribute.

License

(Include information about your project's license here.)

Dependencies

~6–16MB
~182K SLoC