public function getFileContents($filePath, $showError = true)
    {
        $filePath = realpath($filePath);

        if ($this->fileIsReadable($filePath) === false) {
            if ($showError === true) {
                // This file was not readable! We need to tell the user!
                $this->pool->messages->addMessage('fileserviceAccess', array($this->filterFilePath($filePath)));
            }
            // Return empty string.
            return '';
        }

        // Is it readable and does it have any content?
        $size = filesize($filePath);
        if ($size > 0) {
            $file = fopen($filePath, 'r');
            $result = fread($file, $size);
            fclose($file);
            return $result;
        }

        // Empty file returns an empty string.
        return '';
    }