#ifndef _crea_DIRLIST_H_ #define _crea_DIRLIST_H_ #include #include #include namespace crea { class DirList { public : DirList(std::string const &dirName, bool recursive); ~DirList(); std::string NormalizePath(std::string const &pathname); /// Return the name of the directory std::string const &GetDirName() const { return DirName; } /// Return the file names std::vector const &GetFilenames() const { return Filenames; } /// Return the number of Files int GetSize() const { return Filenames.size(); } static bool IsDirectory(std::string const &dirName); std::string GetFirst(); std::string GetNext(); private : int Explore(std::string const &dirName, bool recursive=false); /// List of file names std::vector Filenames; /// name of the root directory to explore std::string DirName; }; } #endif