/**
* Saves all eligible entities into the file system storage (the 'db' folder)
*/
private function saveDatabaseToStorages()
{
if (is_dir(VERSIONPRESS_MIRRORING_DIR)) {
FileSystem::remove(VERSIONPRESS_MIRRORING_DIR);
}
FileSystem::mkdir(VERSIONPRESS_MIRRORING_DIR);
$entityNames = $this->synchronizerFactory->getSynchronizationSequence();
foreach ($entityNames as $entityName) {
$this->createVpidsForEntitiesOfType($entityName);
$this->saveEntitiesOfTypeToStorage($entityName);
$this->reportProgressChange("All " . $entityName . " saved into files");
}
}