Trebejo.File.IO (Trebejo v1.0.0)

Copy Markdown View Source

I/O operations that depend on shell commands.

Moved from Apero.File.IO in v3.0.0. Pure file I/O operations (atomic writes, checksums, temp files, locking) remain in Apero.File.IO. Only disk_usage/1 (which requires the df command via Arrea) lives here.

Summary

Functions

Returns disk usage information for the filesystem containing path.

Functions

disk_usage(path \\ "/")

@spec disk_usage(binary()) :: {:ok, map()} | {:error, binary()}

Returns disk usage information for the filesystem containing path.

Returns a map with :total_mb, :used_mb, :free_mb, :use_pct. Only supported on Unix-like systems.