File: dirwalk.h

package info (click to toggle)
apt-cacher-ng 0.7.27-1~bpo70+1
  • links: PTS
  • area: main
  • in suites: wheezy-backports
  • size: 1,740 kB
  • sloc: cpp: 13,987; sh: 519; perl: 442; ansic: 414; makefile: 77
file content (28 lines) | stat: -rw-r--r-- 580 bytes parent folder | download | duplicates (2)
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 DIRWALK_H_
#define DIRWALK_H_

#include "config.h"
#include <string>

#ifndef MYSTD
#define MYSTD std
#endif

#include "sys/stat.h"

class IFileHandler
{
public:
	virtual bool ProcessRegular(const mstring &sPath, const struct stat &) =0;
	virtual bool ProcessOthers(const mstring &sPath, const struct stat &)=0;
	virtual bool ProcessDirAfter(const mstring &sPath, const struct stat &)=0;
	virtual ~IFileHandler() {};
};

bool DirectoryWalk(const mstring & sRootDir, IFileHandler *h, bool bFilterDoubleDirVisit=true,
		bool bFollowSymlinks=true);




#endif /*DIRWALK_H_*/