| 66 | } |
| 67 | |
| 68 | void object_database::flush() |
| 69 | { |
| 70 | // ilog("Save object_database in ${d}", ("d", _data_dir)); |
| 71 | for( uint32_t space = 0; space < _index.size(); ++space ) |
| 72 | { |
| 73 | fc::create_directories( _data_dir / "object_database" / fc::to_string(space) ); |
| 74 | const auto types = _index[space].size(); |
| 75 | for( uint32_t type = 0; type < types; ++type ) |
| 76 | if( _index[space][type] ) |
| 77 | _index[space][type]->save( _data_dir / "object_database" / fc::to_string(space)/fc::to_string(type) ); |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | void object_database::wipe(const fc::path& data_dir) |
| 82 | { |