|
a/src/utils/fstreewalk.h |
|
b/src/utils/fstreewalk.h |
|
... |
|
... |
16 |
*/
|
16 |
*/
|
17 |
#ifndef _FSTREEWALK_H_INCLUDED_
|
17 |
#ifndef _FSTREEWALK_H_INCLUDED_
|
18 |
#define _FSTREEWALK_H_INCLUDED_
|
18 |
#define _FSTREEWALK_H_INCLUDED_
|
19 |
|
19 |
|
20 |
#include <string>
|
20 |
#include <string>
|
21 |
#include <list>
|
21 |
#include <vector>
|
22 |
|
|
|
23 |
#ifndef NO_NAMESPACES
|
22 |
#ifndef NO_NAMESPACES
|
24 |
using std::string;
|
23 |
using std::string;
|
25 |
using std::list;
|
24 |
using std::vector;
|
26 |
#endif
|
25 |
#endif
|
27 |
|
26 |
|
28 |
class FsTreeWalkerCB;
|
27 |
class FsTreeWalkerCB;
|
29 |
struct stat;
|
28 |
struct stat;
|
30 |
|
29 |
|
|
... |
|
... |
90 |
/** Get explanation for error */
|
89 |
/** Get explanation for error */
|
91 |
string getReason();
|
90 |
string getReason();
|
92 |
int getErrCnt();
|
91 |
int getErrCnt();
|
93 |
|
92 |
|
94 |
/**
|
93 |
/**
|
95 |
* Add a pattern to the list of things (file or dir) to be ignored
|
94 |
* Add a pattern (file or dir) to be ignored (ie: #* , *~)
|
96 |
* (ie: #* , *~)
|
|
|
97 |
*/
|
95 |
*/
|
98 |
bool addSkippedName(const string &pattern);
|
96 |
bool addSkippedName(const string &pattern);
|
99 |
/** Set the ignored patterns list */
|
97 |
/** Set the ignored patterns set */
|
100 |
bool setSkippedNames(const list<string> &patlist);
|
98 |
bool setSkippedNames(const vector<string> &patterns);
|
101 |
|
99 |
|
102 |
/** Same for skipped paths: this are paths, not names, under which we
|
100 |
/** Same for skipped paths: this are paths, not names, under which we
|
103 |
do not descend (ie: /home/me/.recoll) */
|
101 |
do not descend (ie: /home/me/.recoll) */
|
104 |
bool addSkippedPath(const string &path);
|
102 |
bool addSkippedPath(const string &path);
|
105 |
/** Set the ignored paths list */
|
103 |
/** Set the ignored paths list */
|
106 |
bool setSkippedPaths(const list<string> &pathlist);
|
104 |
bool setSkippedPaths(const vector<string> &patterns);
|
107 |
|
105 |
|
108 |
/** Test if path/name should be skipped. This can be used independantly of
|
106 |
/** Test if path/name should be skipped. This can be used independantly of
|
109 |
* an actual tree walk */
|
107 |
* an actual tree walk */
|
110 |
bool inSkippedPaths(const string& path, bool ckparents = true);
|
108 |
bool inSkippedPaths(const string& path, bool ckparents = true);
|
111 |
bool inSkippedNames(const string& name);
|
109 |
bool inSkippedNames(const string& name);
|