#define XERR
#include "zipcheck.ih"

void ZipCheck::inspectExerciseDir()
{
    for (string entry: Glob{})              // inspect all the dir's entries
    {
        if (Stat{ entry }.type() == Stat::DIRECTORY)     // subdirs are OK
        {
            if (isDotDir(entry))
                continue;
            
            exerciseSubdir(entry);          // inspect an exercise dir.
        }
        else if (isTextFile(entry))         // err() if not a text file
        {        
            if (entry != "order.txt")       // order.txt: already done
                requireInOrderTxt(entry);   // the entry must be in
                                            // order.txt
        }
    }

    d_orderTxt.prefix(d_dir);              // prefix d_path to the entries
}


