/**
* Checks which files in the base kernel must be copied
*
* @return boolean
*/
protected function checkKernelFiles()
{
$kernelPath = "ext/kernel";
if (!file_exists($kernelPath)) {
$kernelDone = mkdir($kernelPath, 0775, true);
if (!$kernelDone) {
throw new Exception("Cannot create kernel directory");
}
}
$kernelPath = realpath($kernelPath);
$sourceKernelPath = $this->backend->getInternalKernelPath();
$configured = $this->recursiveProcess($sourceKernelPath, $kernelPath, '@.*\\.[ch]$@', array($this, 'checkKernelFile'));
if (!$configured) {
$this->logger->output('Copying new kernel files...');
$this->recursiveDeletePath($kernelPath, '@^.*\\.[lcho]$@');
@mkdir($kernelPath);
$this->recursiveProcess($sourceKernelPath, $kernelPath, '@^.*\\.[ch]$@');
}
return !$configured;
}