1 /*=========================================================================
4 Module: $RCSfile: gdcmDirList.h,v $
6 Date: $Date: 2005/02/02 15:07:41 $
7 Version: $Revision: 1.23 $
9 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10 l'Image). All rights reserved. See Doc/License.txt or
11 http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*/
22 #include "gdcmCommon.h"
31 typedef std::vector<std::string> DirListType;
33 //-----------------------------------------------------------------------------
35 // NOTE: Due to a VC6 'feature' we can not export a std::list in a dll,
36 // so GDCM_EXPORT keyword was removed for this class only
39 * \brief List containing the file headers of all the gdcm readable files
40 * found by exploring recursively a root directory.
42 class GDCM_EXPORT DirList
45 DirList(std::string const &dirName, bool recursive=false);
48 void Print(std::ostream &os = std::cout);
50 /// Return the name of the directory
51 std::string const &GetDirName() const { return DirName; }
53 /// Return the file names
54 DirListType const &GetFilenames() const { return Filenames; };
56 static bool IsDirectory(std::string const &dirName);
59 int Explore(std::string const &dirName, bool recursive=false);
61 /// List of file names
62 DirListType Filenames;
63 /// name of the root directory to explore
66 } // end namespace gdcm
67 //-----------------------------------------------------------------------------