openMSX
Main Page
Namespaces
Classes
Files
File List
File Members
file
ReadDir.cc
Go to the documentation of this file.
1
#include "
ReadDir.hh
"
2
3
namespace
openmsx {
4
5
ReadDir::ReadDir
(
const
std::string& directory)
6
{
7
dir = opendir(directory.empty() ?
"."
: directory.c_str());
8
}
9
10
ReadDir::~ReadDir
()
11
{
12
if
(dir) {
13
closedir(dir);
14
}
15
}
16
17
struct
dirent*
ReadDir::getEntry
()
18
{
19
if
(!dir) {
20
return
nullptr
;
21
}
22
return
readdir(dir);
23
}
24
25
bool
ReadDir::isValid
()
const
26
{
27
return
dir !=
nullptr
;
28
}
29
30
}
// namespace openmsx
Generated on Mon Jun 17 2013 22:18:16 for openMSX by
1.8.1.2