Archive.list

ListingRange list() @safe

Returns a forward range over the archive's root listing.

The returned range is a snapshot taken at construction time and supports foreach, std.algorithm operations, and save().

Returns

A ListingRange over all entries in the archive root.

Throws

DarException if listing fails (I/O error, corruption).

Example:

auto arc = Archive.open("/backups", "myarchive", "dar", readOpts().toLow());
foreach (entry; arc.list())
    writefln("%s: %d bytes", entry.name, entry.size);

// Use with std.algorithm
import std.algorithm : filter, map;
auto txtFiles = arc.list()
                   .filter!(e => e.name.endsWith(".txt"))
                   .map!(e => e.name);