Have Directory::next_entry() recognise that no more entries are available by rewinding the read index and returning NULL.