summaryrefslogtreecommitdiff
path: root/src/tool/dir.h
blob: eea78f7156707a11575b266aab20c674152b94dc (plain)
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
29
30
31
32
33
34
35

#ifndef DIR_H
#define DIR_H

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

#include <vector>

#include "../incl.h"

using namespace std;

class dir
{
private:
  bool b_open;
  DIR *p_d;
  struct dirent *p_ep;
  vector<string> vec_dir;

public:
  dir();
  ~dir();

  bool open_dir( char *c_dir );
  bool open_dir( string &s_dir );
  void close_dir();
  void read_dir();
  vector<string> get_dir_vec();
};

#endif