Child: [1a897c] (diff)

Download this file

fstreewalk.h    29 lines (22 with data), 789 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef _FSTREEWALK_H_INCLUDED_
#define _FSTREEWALK_H_INCLUDED_
/* @(#$Id: fstreewalk.h,v 1.1 2004-12-10 18:13:13 dockes Exp $ (C) 2004 J.F.Dockes */
#include <string>
class FsTreeWalker {
public:
enum CbFlag {FtwRegular, FtwDirEnter, FtwDirReturn};
enum Status {FtwOk=0, FtwError=1, FtwStop=2,
FtwStatAll = FtwError|FtwStop};
enum Options {FtwOptNone = 0, FtwNoRecurse = 1, FtwFollow = 2};
typedef Status (*CbType)(void *cdata,
const std::string &, const struct stat *, CbFlag);
FsTreeWalker(Options opts = FtwOptNone);
~FsTreeWalker();
Status walk(const std::string &dir, CbType fun, void *cdata);
std::string getReason();
int getErrCnt();
private:
class Internal;
Internal *data;
};
#endif /* _FSTREEWALK_H_INCLUDED_ */