1 /*=========================================================================
4 Module: $RCSfile: gdcmDirList.h,v $
6 Date: $Date: 2005/11/28 15:20:33 $
7 Version: $Revision: 1.28 $
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"
23 #include "gdcmCommandManager.h"
32 typedef std::vector<std::string> DirListType;
34 //-----------------------------------------------------------------------------
36 // NOTE: Due to a M$VC6 'feature' we cannot export a std::list in a dll,
37 // so GDCM_EXPORT keyword was removed for this class only
40 * \brief List containing the file headers of all the 'gdcm readable' files
41 * found by exploring (possibely recursively) a root directory.
43 class GDCM_EXPORT DirList : public CommandManager
46 DirList(std::string const &dirName, bool recursive=false);
49 void Print(std::ostream &os = std::cout);
51 /// Return the name of the directory
52 std::string const &GetDirName() const { return DirName; }
54 /// Return the file names
55 DirListType const &GetFilenames() const { return Filenames; }
57 static bool IsDirectory(std::string const &dirName);
60 int Explore(std::string const &dirName, bool recursive=false);
62 /// List of file names
63 DirListType Filenames;
64 /// name of the root directory to explore
67 } // end namespace gdcm
68 //-----------------------------------------------------------------------------