diff --git a/src/Database.cpp b/src/Database.cpp index ae0b555d..9669928f 100644 --- a/src/Database.cpp +++ b/src/Database.cpp @@ -26,7 +26,25 @@ #include #include +#include #include +#include // TODO Remove + +//////////////////////////////////////////////////////////////////////////////// +void Database::initialize (const std::string& location) +{ + _location = location; + + Directory d (_location); + for (const auto& file : d.list ()) + { + if (1 /* looks like one of our data files */) + { + _data_files.push_back (file); + std::cout << "# data file " << file << "\n"; + } + } +} //////////////////////////////////////////////////////////////////////////////// std::string Database::dump () const diff --git a/src/Database.h b/src/Database.h index 97974bb9..073142e1 100644 --- a/src/Database.h +++ b/src/Database.h @@ -34,9 +34,11 @@ class Database { public: Database () = default; + void initialize (const std::string&); std::string dump () const; private: + std::string _location {"~/.timewarrior"}; std::vector _data_files {}; };