BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
587ae25
Branches
Tags
master
Blinker
src
linux
Directory.h
namespace for preprocessor constants
Stefan Schuermans
commited
587ae25
at 2011-12-14 20:23:49
Directory.h
Blame
History
Raw
/* Blinker Copyright 2011 Stefan Schuermans <stefan@blinkenarea.org> Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html a blinkenarea.org project */ #ifndef BLINKER_DIRECTORY_H #define BLINKER_DIRECTORY_H #include <list> #include <string> #include "File.h" namespace Blinker { /// information about a directory class Directory: public File { public: /// type of directory entries enum Type { TypeSubdir, ///< subdirectory TypeFile ///< file }; public: /** * @brief constructor from path * @param[in] path path to directory */ Directory(const std::string &path); public: /** * @brief get list of entries in directory * @param[in] type type of directory entries to return * @param[out] entries list of directory entries */ void getEntries(Type type, std::list<std::string> &entries) const; /** * @brief get subdirectory * @param[in] name of subdirectory * @return subdirectory object */ Directory getSubdir(const std::string &name) const; /** * @brief get file in directory * @param[in] name of file * @return file object */ File getFile(const std::string &name) const; }; // class Directory } // namespace Blinker #endif // #ifndef BLINKER_DIRECTORY_H