Phrozn\Runner\CommandLine\Callback\Single::updateFile PHP Method

updateFile() private method

private updateFile ( )
    private function updateFile()
    {
        list($file, $in, $out) = $this->getPaths();
        ob_start();
        $this->out($this->getHeader());
        $this->out("Starting static file compilation.\n");
        $proceed = true;
        if (!is_dir($in)) {
            $this->out(self::STATUS_FAIL . "Source directory '{$in}' not found.");
            $proceed = false;
        } else {
            $this->out(self::STATUS_OK . "Source directory located: {$in}");
        }
        if (!is_dir($out)) {
            $this->out(self::STATUS_FAIL . "Destination directory '{$out}' not found.");
            $proceed = false;
        } else {
            $this->out(self::STATUS_OK . "Destination directory located: {$out}");
        }
        if (!is_file($file)) {
            $this->out(self::STATUS_FAIL . "Source file '{$file}' not found.");
            $proceed = false;
        } else {
            $this->out(self::STATUS_OK . "Source file located: {$file}");
        }
        if ($proceed === false) {
            $this->out($this->getFooter());
            return;
        }
        $site = new Site($in, $out);
        $site->setSingleFile($file);
        $site->setOutputter($this->getOutputter())->compile();
        $this->out($this->getFooter());
        ob_end_clean();
    }