--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/walker.h Sat Feb 12 13:45:55 2011 +0300
@@ -0,0 +1,20 @@
+#ifndef _WALKER_H_INCLUDED_
+#define _WALKER_H_INCLUDED_
+#include <string>
+#include <magic.h>
+
+class MagicWalker {
+
+ public:
+ std::string root;
+ MagicWalker(const std::string root);
+ ~MagicWalker ();
+ void Run() { HandleDir(root.c_str()); }
+ protected:
+ virtual int HandleFile(const char *filename);
+ virtual int HandleDir(const char *dirname);
+ const char *GetFileMagic(const char *filename);
+ magic_t magic;
+};
+
+#endif