X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDirList.cxx;h=f49c0ba92c0168caa0fa2b42137ca15558fefaf3;hb=cecf8a0bb86a9b3223a9d02d1106a564aa6ef7f9;hp=21c0c21b6726e01809cb2024ec4c5603801aff5b;hpb=1b5fd950fda2fb2dbe9aa69bac545a8b588b71d0;p=gdcm.git diff --git a/src/gdcmDirList.cxx b/src/gdcmDirList.cxx index 21c0c21b..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,18 +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 dirName - * @param recursive + * @param dirName root directory name + * @param recursive whether we want to explore recursively or not */ gdcmDirList::gdcmDirList(std::string dirName,bool recursive) { @@ -41,7 +36,7 @@ gdcmDirList::gdcmDirList(std::string dirName,bool recursive) Explore(name,recursive); } -/* +/** * \ingroup gdcmDirList * \brief Destructor */ @@ -54,7 +49,7 @@ gdcmDirList::~gdcmDirList(void) //----------------------------------------------------------------------------- // Public -/* +/** * \ingroup gdcmDirList * \brief Get the directory name * @return the directory name @@ -69,21 +64,8 @@ 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 dirName directory to explore