protected function unpublishFile($relativeTargetPathAndFilename) { $targetPathAndFilename = $this->path . $relativeTargetPathAndFilename; if (!file_exists($targetPathAndFilename)) { return; } if (!Files::unlink($targetPathAndFilename)) { return; } Files::removeEmptyDirectoriesOnPath(dirname($targetPathAndFilename)); }