|
a/src/utils/fstreewalk.h |
|
b/src/utils/fstreewalk.h |
|
... |
|
... |
14 |
* Free Software Foundation, Inc.,
|
14 |
* Free Software Foundation, Inc.,
|
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
16 |
*/
|
16 |
*/
|
17 |
#ifndef _FSTREEWALK_H_INCLUDED_
|
17 |
#ifndef _FSTREEWALK_H_INCLUDED_
|
18 |
#define _FSTREEWALK_H_INCLUDED_
|
18 |
#define _FSTREEWALK_H_INCLUDED_
|
19 |
/* @(#$Id: fstreewalk.h,v 1.5 2006-01-30 11:15:28 dockes Exp $ (C) 2004 J.F.Dockes */
|
19 |
/* @(#$Id: fstreewalk.h,v 1.6 2006-12-21 08:22:35 dockes Exp $ (C) 2004 J.F.Dockes */
|
20 |
|
20 |
|
21 |
#include <string>
|
21 |
#include <string>
|
22 |
#include <list>
|
22 |
#include <list>
|
23 |
|
23 |
|
24 |
#ifndef NO_NAMESPACES
|
24 |
#ifndef NO_NAMESPACES
|
|
... |
|
... |
54 |
*/
|
54 |
*/
|
55 |
Status walk(const string &dir, FsTreeWalkerCB& cb);
|
55 |
Status walk(const string &dir, FsTreeWalkerCB& cb);
|
56 |
/** Get explanation for error */
|
56 |
/** Get explanation for error */
|
57 |
string getReason();
|
57 |
string getReason();
|
58 |
int getErrCnt();
|
58 |
int getErrCnt();
|
|
|
59 |
|
59 |
/**
|
60 |
/**
|
60 |
* Add a pattern to the list of things (file or dir) to be ignored
|
61 |
* Add a pattern to the list of things (file or dir) to be ignored
|
61 |
* (ie: #* , *~)
|
62 |
* (ie: #* , *~)
|
62 |
*/
|
63 |
*/
|
63 |
bool addSkippedName(const string &pattern);
|
64 |
bool addSkippedName(const string &pattern);
|
64 |
/** Set the ignored patterns list */
|
65 |
/** Set the ignored patterns list */
|
65 |
bool setSkippedNames(const list<string> &patlist);
|
66 |
bool setSkippedNames(const list<string> &patlist);
|
|
|
67 |
|
|
|
68 |
/** Same for skipped paths: this are paths, not names, under which we
|
|
|
69 |
do not descend (ie: /home/me/.recoll) */
|
|
|
70 |
bool addSkippedPath(const string &path);
|
66 |
/** Clear the ignored patterns list */
|
71 |
/** Set the ignored paths list */
|
67 |
void clearSkippedNames();
|
72 |
bool setSkippedPaths(const list<string> &pathlist);
|
68 |
|
73 |
|
69 |
private:
|
74 |
private:
|
|
|
75 |
Status iwalk(const string &dir, FsTreeWalkerCB& cb);
|
70 |
class Internal;
|
76 |
class Internal;
|
71 |
Internal *data;
|
77 |
Internal *data;
|
72 |
};
|
78 |
};
|
73 |
|
79 |
|
74 |
class FsTreeWalkerCB {
|
80 |
class FsTreeWalkerCB {
|