DirManager

Macros

Line Code
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
#ifndef EVFUTILITIESDIRMANAGER_H
#define EVFUTILITIESDIRMANAGER_H

#include <sys/types.h>
#include <dirent.h>

#include <string>

#include <cstdlib>

namespace evf {

  class DirManager {
  public:
    DirManager(std::string &d) : dir_(d) {}
    virtual ~DirManager() {}
    unsigned int findHighestRun();
    std::string findHighestRunDir();
    std::string findRunDir(unsigned int);
    bool checkDirEmpty(std::string &);

  private:
    std::string dir_;  // this is the base dir with all runs in it
  };

}  // namespace evf
#endif