/* filesystem/directory.h This file is part of the Osirion project and is distributed under the terms of the GNU General Public License version 2 */ #ifndef __INCLUDED_FILESYSTEM_DIRECTORY_H__ #define __INCLUDED_FILESYSTEM_DIRECTORY_H__ // C++ headers #include #include namespace filesystem { /** * @brief an abstract interface to handle file access */ class Directory { public: typedef std::list FileNames; Directory(); Directory(const std::string & location); ~Directory(); // inspectors /** * @brief returns the underlying filesystem location */ inline const std::string & location() const { return directory_location; } inline const FileNames & filenames() const { return directory_filenames; } // mutators /** * @brief set the underlying filesystem location */ void set_location(const std::string & location); /** * @brief read the filenames from current filesystem location */ void read(); void clear(); private: std::string directory_location; FileNames directory_filenames; }; } // namespace filesystem #endif // __INCLUDED_FILESYSTEM_DIRECTORY_H__