protected function readFileAndExit($file, $mimeType)
    {
        $file->getStorage()->dumpFileContents($file, true, null, $mimeType);
        exit;
    }
protected function readFileAndExit($file, $mimeType)
    {
        $file->getStorage()->dumpFileContents($file, true, null, $mimeType);
        exit;
    }
protected function readFileAndExit ( $ file , $ mimeType ) { $ file -> getStorage ( ) -> dumpFileContents ( $ file , true , null , $ mimeType ) ; exit ; }
Calls the PHP readfile function and exits.

@param FileInterface $file The file that should be read.
@param string $mimeType Optional mime type override. If empty the automatically detected mime type will be used.
Calls the PHP readfile function and exits .