Skip to main content

Module ncdu

Module ncdu 

Source
Expand description

The ncdu JSON dump format (https://dev.yorhel.nl/ncdu/jsonfmt), as written by ncdu -o and gdu -o.

A dump is [1, 2, {metadata}, directory], where a directory is an array of its own info object followed by its children: nested arrays for directories, objects for everything else. Each entry carries its own apparent size (asize) and disk usage (dsize); readers aggregate them. Names are raw bytes, not necessarily UTF-8, so both directions work on bytes rather than through a JSON library. Both are iterative and stream, so neither nesting depth nor dump size is limited by the stack or by holding the document in memory.

Functionsยง

read
Read an ncdu dump into a tree measured as options asks.
write
Write tree as an ncdu dump, format version 1.2.