private function deleteFolder(Path $p) { $folderPath = $this->baseDir . $p->getPath(); if (false === @rmdir($folderPath)) { throw new DocumentStorageException('unable to delete folder'); } }