summaryrefslogtreecommitdiff
path: root/src/tool/dir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tool/dir.cpp')
-rw-r--r--src/tool/dir.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/tool/dir.cpp b/src/tool/dir.cpp
index 392112a..a23cca2 100644
--- a/src/tool/dir.cpp
+++ b/src/tool/dir.cpp
@@ -7,60 +7,60 @@ using namespace std;
dir::dir()
{
- b_open = false;
+ b_open = false;
}
dir::~dir()
{
- dir_vec.clear();
- close_dir();
+ vec_dir.clear();
+ close_dir();
}
bool
dir::open_dir( char *c_dir )
{
- string s_dir( c_dir );
- return open_dir( s_dir );
+ string s_dir( c_dir );
+ return open_dir( s_dir );
}
bool
dir::open_dir( string &s_dir )
{
- if ( b_open )
- return false;
+ if ( b_open )
+ return false;
- dp = opendir( s_dir.c_str() );
+ p_d = opendir( s_dir.c_str() );
- if ( dp == NULL )
- return false; // Could not open dir.
+ if ( p_d == NULL )
+ return false; // Could not open dir.
- b_open = true;
+ b_open = true;
- return true; // Could open dir with success.
+ return true; // Could open dir with success.
}
void
dir::close_dir()
{
- if ( b_open && dp != NULL )
- {
- closedir( dp );
- b_open = false;
- }
+ if ( b_open && p_d != NULL )
+ {
+ closedir( p_d );
+ b_open = false;
+ }
}
void
dir::read_dir()
{
- if ( dp != NULL )
- while( ep = readdir( dp ) )
- dir_vec.push_back( string( ep->d_name ) );
+ if ( p_d != NULL )
+ while( p_ep = readdir( p_d ) )
+ vec_dir.push_back( string( p_ep->d_name ) );
}
-vector<string>
+vector<string>
dir::get_dir_vec()
{
- return dir_vec;
+ return vec_dir;
}
#endif