// gdcmDirList.cxx
//-----------------------------------------------------------------------------
#include "gdcmDirList.h"
+#include "gdcmUtil.h"
#include <iostream>
#include <algorithm>
#include <unistd.h>
#endif
-//-----------------------------------------------------------------------------
-const char gdcmDirList::SEPARATOR_X = '/';
-const char gdcmDirList::SEPARATOR_WIN = '\\';
-const std::string gdcmDirList::SEPARATOR = "/";
-
-//-----------------------------------------------------------------------------
// Constructor / Destructor
-/*
+/**
* \ingroup gdcmDirList
* \brief Constructor
- * @param
+ * @param dirName root directory name
+ * @param recursive whether we want to explore recursively or not
*/
gdcmDirList::gdcmDirList(std::string dirName,bool recursive)
{
Explore(name,recursive);
}
-/*
+/**
* \ingroup gdcmDirList
* \brief Destructor
*/
//-----------------------------------------------------------------------------
// Public
-/*
+/**
* \ingroup gdcmDirList
* \brief Get the directory name
- * @param
+ * @return the directory name
*/
std::string gdcmDirList::GetDirName(void)
{
//-----------------------------------------------------------------------------
// Private
-/*
- * \ingroup gdcmDirList
- * \brief Add a SEPARATOR to the end of the directory name is necessary
- * @param
- */
-void gdcmDirList::NormalizePath(std::string &dirName)
-{
- int size=dirName.size();
- if((dirName[size-1]!=SEPARATOR_X)&&(dirName[size-1]!=SEPARATOR_WIN))
- {
- dirName+=SEPARATOR;
- }
-}
-/*
+/**
* \ingroup gdcmDirList
* \brief Explore a directory with possibility of recursion
- * @param
+ * @param dirName directory to explore
+ * @param recursive whether we want recursion or not
*/
void gdcmDirList::Explore(std::string dirName,bool recursive)
{