X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDirList.cxx;h=f49c0ba92c0168caa0fa2b42137ca15558fefaf3;hb=cecf8a0bb86a9b3223a9d02d1106a564aa6ef7f9;hp=2bf597f10f1623b8cc71ad591e9c62b9310556a0;hpb=9232388f3d3f9defdc6a8ac291a79b9a97b79dcf;p=gdcm.git diff --git a/src/gdcmDirList.cxx b/src/gdcmDirList.cxx index 2bf597f1..f49c0ba9 100644 --- a/src/gdcmDirList.cxx +++ b/src/gdcmDirList.cxx @@ -1,6 +1,7 @@ // gdcmDirList.cxx //----------------------------------------------------------------------------- #include "gdcmDirList.h" +#include "gdcmUtil.h" #include #include @@ -20,17 +21,12 @@ #include #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) { @@ -40,7 +36,7 @@ gdcmDirList::gdcmDirList(std::string dirName,bool recursive) Explore(name,recursive); } -/* +/** * \ingroup gdcmDirList * \brief Destructor */ @@ -53,10 +49,10 @@ gdcmDirList::~gdcmDirList(void) //----------------------------------------------------------------------------- // Public -/* +/** * \ingroup gdcmDirList * \brief Get the directory name - * @param + * @return the directory name */ std::string gdcmDirList::GetDirName(void) { @@ -68,24 +64,12 @@ 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) {