File tree Expand file tree Collapse file tree 4 files changed +13
-0
lines changed
Expand file tree Collapse file tree 4 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,9 @@ class WalletDatabase
155155 /* * Return path to main database file for logs and error messages. */
156156 virtual std::string Filename () = 0;
157157
158+ /* * Return paths to all database created files */
159+ virtual std::vector<fs::path> Files () = 0;
160+
158161 virtual std::string Format () = 0;
159162
160163 /* * Make a DatabaseBatch connected to this database */
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ class BerkeleyRODatabase : public WalletDatabase
5050
5151 /* * Return path to main database file for logs and error messages. */
5252 std::string Filename () override { return fs::PathToString (m_filepath); }
53+ std::vector<fs::path> Files () override { return {m_filepath}; }
5354
5455 std::string Format () override { return " bdb_ro" ; }
5556
Original file line number Diff line number Diff line change @@ -147,6 +147,14 @@ class SQLiteDatabase : public WalletDatabase
147147 bool Backup (const std::string& dest) const override ;
148148
149149 std::string Filename () override { return m_file_path; }
150+ /* * Return paths to all database created files */
151+ std::vector<fs::path> Files () override
152+ {
153+ std::vector<fs::path> files;
154+ files.emplace_back (m_dir_path / fs::PathFromString (m_file_path));
155+ files.emplace_back (m_dir_path / fs::PathFromString (m_file_path + " -journal" ));
156+ return files;
157+ }
150158 std::string Format () override { return " sqlite" ; }
151159
152160 /* * Make a SQLiteBatch connected to this database */
Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ class MockableDatabase : public WalletDatabase
109109 void Close () override {}
110110
111111 std::string Filename () override { return " mockable" ; }
112+ std::vector<fs::path> Files () override { return {}; }
112113 std::string Format () override { return " mock" ; }
113114 std::unique_ptr<DatabaseBatch> MakeBatch () override { return std::make_unique<MockableBatch>(m_records, m_pass); }
114115};
You can’t perform that action at this time.
0 commit comments