| 168 | } |
| 169 | |
| 170 | bool AssetsCache::Save() |
| 171 | { |
| 172 | // Registry can be saved only in editor |
| 173 | #if USE_EDITOR |
| 174 | |
| 175 | // Check if registry hasn't been edited |
| 176 | if (!_isDirty && FileSystem::FileExists(_path)) |
| 177 | return false; |
| 178 | |
| 179 | ASSETS_CACHE_LOCK(); |
| 180 | |
| 181 | if (Save(_path, _registry, _pathsMapping)) |
| 182 | return true; |
| 183 | |
| 184 | _isDirty = false; |
| 185 | |
| 186 | #endif |
| 187 | |
| 188 | return false; |
| 189 | } |
| 190 | |
| 191 | bool AssetsCache::Save(const StringView& path, const Registry& entries, const PathsMapping& pathsMapping, const AssetsCacheFlags flags) |
| 192 | { |