title: Read directory with libarchive
body: <p>I've got a C++ program and I desire to read an archive of some description from the disk. I want to reconstruct it in a roughly tree-like form to mirror the structure on the disk (funky stuff like symlinks/hardlinks not supported).</p>
  
  <p>When reading the next header, it's clear that you can check the entry type to see if it is a directory or a file. What's not clear is what happens next if it's a directory. Does <code>archive_read_next_header</code> automatically perform a full tree traversal in BFS/DFS fashion? Or am I supposed to recursively create new <code>archive_entry</code> structures and call some function I didn't find yet to traverse directory entries?</p>