protected function unpublishFile($relativeTargetPathAndFilename)
    {
        $targetPathAndFilename = $this->path . $relativeTargetPathAndFilename;
        if (!is_link($targetPathAndFilename) && !file_exists($targetPathAndFilename)) {
            $message = sprintf('Did not remove file %s because it did not exist.', $targetPathAndFilename);
            $this->messageCollector->append($message, Error::SEVERITY_NOTICE);
            return;
        }
        if (!Files::unlink($targetPathAndFilename)) {
            $message = sprintf('Removal of file %s failed.', $targetPathAndFilename);
            $this->messageCollector->append($message, Error::SEVERITY_WARNING);
            return;
        }
        Files::removeEmptyDirectoriesOnPath(dirname($targetPathAndFilename));
    }
protected function unpublishFile($relativeTargetPathAndFilename)
    {
        $targetPathAndFilename = $this->path . $relativeTargetPathAndFilename;
        if (!is_link($targetPathAndFilename) && !file_exists($targetPathAndFilename)) {
            $message = sprintf('Did not remove file %s because it did not exist.', $targetPathAndFilename);
            $this->messageCollector->append($message, Error::SEVERITY_NOTICE);
            return;
        }
        if (!Files::unlink($targetPathAndFilename)) {
            $message = sprintf('Removal of file %s failed.', $targetPathAndFilename);
            $this->messageCollector->append($message, Error::SEVERITY_WARNING);
            return;
        }
        Files::removeEmptyDirectoriesOnPath(dirname($targetPathAndFilename));
    }
protected function unpublishFile ( $ relativeTargetPathAndFilename ) { $ targetPathAndFilename = $ this -> path . $ relativeTargetPathAndFilename ; if ( ! is_link ( $ targetPathAndFilename ) && ! file_exists ( $ targetPathAndFilename ) ) { $ message = sprintf ( 'Did not remove file %s because it did not exist.' , $ targetPathAndFilename ) ; $ this -> messageCollector -> append ( $ message , Error :: SEVERITY_NOTICE ) ; return ; } if ( ! Files :: unlink ( $ targetPathAndFilename ) ) { $ message = sprintf ( 'Removal of file %s failed.' , $ targetPathAndFilename ) ; $ this -> messageCollector -> append ( $ message , Error :: SEVERITY_WARNING ) ; return ; } Files :: removeEmptyDirectoriesOnPath ( dirname ( $ targetPathAndFilename ) ) ; }
Removes the specified target file from the public directory

This method fails silently if the given file could not be unpublished or already didn't exist anymore.

@param string $relativeTargetPathAndFilename relative path and filename in the target directory
@return void
Removes the specified target file from the public directory