walker.h
author Stiletto <blasux@blasux.ru>
Thu, 22 Sep 2011 13:27:23 +0400
changeset 9 ae87469781f2
parent 0 56281d90869c
permissions -rw-r--r--
CUE extractor

#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