appData = $appData; } public function postWrite(Node $node) { $this->deleteNode($node); } protected function deleteNode(Node $node) { // We only handle files if ($node instanceof Folder) { return; } try { if (is_null($node->getId())) { return; } $folder = $this->appData->getFolder((string)$node->getId()); $folder->delete(); } catch (NotFoundException $e) { //Nothing to do } } public function versionRollback(array $data) { if (isset($data['node'])) { $this->deleteNode($data['node']); } } }