Switch to unified view

a/src/utils/fstreewalk.h b/src/utils/fstreewalk.h
...
...
54
    // after processing a subdirectory.
54
    // after processing a subdirectory.
55
    enum CbFlag {FtwRegular, FtwDirEnter, FtwDirReturn};
55
    enum CbFlag {FtwRegular, FtwDirEnter, FtwDirReturn};
56
    enum Status {FtwOk=0, FtwError=1, FtwStop=2, 
56
    enum Status {FtwOk=0, FtwError=1, FtwStop=2, 
57
         FtwStatAll = FtwError|FtwStop};
57
         FtwStatAll = FtwError|FtwStop};
58
    enum Options {FtwOptNone = 0, FtwNoRecurse = 1, FtwFollow = 2,
58
    enum Options {FtwOptNone = 0, FtwNoRecurse = 1, FtwFollow = 2,
59
                  FtwNoCanon = 4,
59
                  FtwNoCanon = 4, FtwSkipDotFiles = 8,
60
    // Tree walking options.  Natural is close to depth first: process
60
    // Tree walking options.  Natural is close to depth first: process
61
    //   directory entries as we see them, recursing into subdirectories at 
61
    //   directory entries as we see them, recursing into subdirectories at 
62
    //   once 
62
    //   once 
63
    // Breadth means we process all files and dirs at a given directory level
63
    // Breadth means we process all files and dirs at a given directory level
64
    // before going deeper.
64
    // before going deeper.
...
...
74
    };
74
    };
75
    static const int FtwTravMask;
75
    static const int FtwTravMask;
76
    FsTreeWalker(int opts = FtwTravNatural);
76
    FsTreeWalker(int opts = FtwTravNatural);
77
    ~FsTreeWalker();
77
    ~FsTreeWalker();
78
78
79
    void setOpts(Options opts, int depthswitch = 4);
79
    void setOpts(int opts);
80
    int getOpts();
81
    void setDepthSwitch(int);
82
    void setMaxDepth(int);
80
83
81
    /** 
84
    /** 
82
     * Begin file system walk.
85
     * Begin file system walk.
83
     * @param dir is not checked against the ignored patterns (this is 
86
     * @param dir is not checked against the ignored patterns (this is 
84
     *     a feature and must not change.
87
     *     a feature and must not change.
...
...
108
    bool inSkippedPaths(const string& path, bool ckparents = true);
111
    bool inSkippedPaths(const string& path, bool ckparents = true);
109
    bool inSkippedNames(const string& name);
112
    bool inSkippedNames(const string& name);
110
113
111
 private:
114
 private:
112
    Status iwalk(const string &dir, struct stat *stp, FsTreeWalkerCB& cb);
115
    Status iwalk(const string &dir, struct stat *stp, FsTreeWalkerCB& cb);
113
    class Internal;
116
    class Internal; 
114
    Internal *data;
117
   Internal *data;
115
};
118
};
116
119
117
class FsTreeWalkerCB {
120
class FsTreeWalkerCB {
118
 public:
121
 public:
119
    virtual ~FsTreeWalkerCB() {}
122
    virtual ~FsTreeWalkerCB() {}