blob: cdd9870032f6dedf11bf5e9f7ebaecd0bcb3b42e (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
/*
filesystem/directory.h
This file is part of the Osirion project and is distributed under
the terms of the GNU General Public License version 2
*/
#ifndef __INCLUDED_FILESYSTEM_DIRECTORY_H__
#define __INCLUDED_FILESYSTEM_DIRECTORY_H__
// C++ headers
#include <string>
#include <list>
namespace filesystem
{
/**
* @brief an abstract interface to handle file access
*/
class Directory {
public:
typedef std::list<std::string> FileNames;
Directory();
Directory(const std::string & location);
~Directory();
// inspectors
/**
* @brief returns the underlying filesystem location
*/
inline const std::string & location() const {
return directory_location;
}
inline const FileNames & filenames() const {
return directory_filenames;
}
// mutators
/**
* @brief set the underlying filesystem location
*/
void set_location(const std::string & location);
/**
* @brief read the filenames from current filesystem location
*/
void read();
void clear();
private:
std::string directory_location;
FileNames directory_filenames;
};
} // namespace filesystem
#endif // __INCLUDED_FILESYSTEM_DIRECTORY_H__
|