Archive.listChildren

ChildrenRange listChildren(string path) @safe

Returns a forward range over the children of the given directory path.

This is equivalent to calling the free function childrenRange(_h, path), but provided here as a convenient instance method consistent with list(). The resulting range is a snapshot taken at construction time and supports foreach, std.algorithm, and save().

Parameters

pathdirectory path within the archive whose children to list

Returns

A ChildrenRange over entries directly under path.

Throws

DarException if listing fails for the given path.

Example:

auto arc = Archive.open("/backups", "myarchive", "dar", readOpts().toLow());
foreach (e; arc.listChildren("docs"))
    writeln(e.name);