File: dirwalk.h

package info (click to toggle)
apt-cacher-ng 0.8.0-3
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,768 kB
  • ctags: 1,640
  • sloc: cpp: 14,741; ansic: 462; perl: 376; sh: 357; makefile: 88
file content (24 lines) | stat: -rw-r--r-- 552 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef DIRWALK_H_
#define DIRWALK_H_

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

#include <sys/stat.h>

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

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




#endif /*DIRWALK_H_*/