public function save($path, $content, $visibility = self::VISIBILITY_PRIVATE)
{
if (!$this->master->has($path)) {
// File creation: remove from backup if it existed and warm-up both master and backup
$this->createAndBackup($path, $content);
} else {
// File update: backup before writing
$this->backupAndUpdate($path, $content);
}
if ($this->enableBackup) {
$this->backup->setVisibility($path, $visibility);
}
$this->master->setVisibility($path, $visibility);
}