00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef GDCMDIRLIST_H
00020 #define GDCMDIRLIST_H
00021
00022 #include "gdcmBase.h"
00023
00024 #include <string>
00025 #include <vector>
00026 #include <iostream>
00027
00028 namespace gdcm
00029 {
00030
00031 typedef std::vector<std::string> DirListType;
00032
00033
00034
00035
00036
00037
00042 class GDCM_EXPORT DirList : public Base
00043 {
00044 public :
00045 DirList(std::string const &dirName, bool recursive=false);
00046 ~DirList();
00047
00048 void Print(std::ostream &os = std::cout, std::string const &indent = "" );
00049
00051 std::string const &GetDirName() const { return DirName; }
00052
00054 DirListType const &GetFilenames() const { return Filenames; }
00055
00056 static bool IsDirectory(std::string const &dirName);
00057
00058 private :
00059 int Explore(std::string const &dirName, bool recursive=false);
00060
00062 DirListType Filenames;
00064 std::string DirName;
00065 };
00066 }
00067
00068 #endif