X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDirList.cxx;h=efdc939369ee3cf2ad6a3c1f54ca4728631fa8a0;hb=5222e6cd8520ec5cc0247d850982721becf4756a;hp=203c0a5f11b8cb31912e819e60061baa383e75fa;hpb=be70f5cdc8ac472bff8ad8a36637457fe49778bd;p=gdcm.git diff --git a/src/gdcmDirList.cxx b/src/gdcmDirList.cxx index 203c0a5f..efdc9393 100644 --- a/src/gdcmDirList.cxx +++ b/src/gdcmDirList.cxx @@ -1,32 +1,39 @@ -// gdcmDirList.cxx -//----------------------------------------------------------------------------- +/*========================================================================= + + Program: gdcm + Module: $RCSfile: gdcmDirList.cxx,v $ + Language: C++ + Date: $Date: 2004/06/28 09:30:58 $ + Version: $Revision: 1.17 $ + + Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de + l'Image). All rights reserved. See Doc/License.txt or + http://www.creatis.insa-lyon.fr/Public/Gdcm/License.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + #include "gdcmDirList.h" #include "gdcmUtil.h" #include #include -#ifdef GDCM_NO_ANSI_STRING_STREAM - #include - #define ostringstream ostrstream -#else - #include -#endif - -#ifdef _MSC_VER +#if defined(_MSC_VER) || defined (__CYGWIN__) #include +#ifdef _MSC_VER #include +#endif //_MSC_VER #else #include #include #endif -// ================= WARNING -// ================= DOXYGEN DOESN'T WORK FOR THIS FILE ?!? -// ================= - // Constructor / Destructor -/* +/** * \ingroup gdcmDirList * \brief Constructor * @param dirName root directory name @@ -35,12 +42,11 @@ gdcmDirList::gdcmDirList(std::string dirName,bool recursive) { name=dirName; - NormalizePath(name); Explore(name,recursive); } -/* +/** * \ingroup gdcmDirList * \brief Destructor */ @@ -53,7 +59,7 @@ gdcmDirList::~gdcmDirList(void) //----------------------------------------------------------------------------- // Public -/* +/** * \ingroup gdcmDirList * \brief Get the directory name * @return the directory name @@ -69,7 +75,7 @@ std::string gdcmDirList::GetDirName(void) //----------------------------------------------------------------------------- // Private -/* +/** * \ingroup gdcmDirList * \brief Explore a directory with possibility of recursion * @param dirName directory to explore @@ -78,10 +84,8 @@ std::string gdcmDirList::GetDirName(void) void gdcmDirList::Explore(std::string dirName,bool recursive) { std::string fileName; - NormalizePath(dirName); - -#ifdef _MSC_VER +#if defined(_MSC_VER) || (__CYGWIN__) WIN32_FIND_DATA fileData; HANDLE hFile=FindFirstFile((dirName+"*").c_str(),&fileData); int found=true; @@ -108,7 +112,7 @@ void gdcmDirList::Explore(std::string dirName,bool recursive) for (int i= 0;i < n; i++) { - fileName=namelist[i]->d_name; + fileName=namelist[i]->d_name; if(namelist[i]->d_type==DT_DIR) { if( (fileName!=".") && (fileName!="..") && (recursive) )