Contao\CoreBundle\Command\SymlinksCommand::symlink PHP Method

    private function symlink($target, $link)
    {
        $target = strtr($target, '\\', '/');
        $link = strtr($link, '\\', '/');
        try {
            SymlinkUtil::symlink($target, $link, $this->rootDir);
            $this->rows[] = [sprintf('<fg=green;options=bold>%s</>', '\\' === DIRECTORY_SEPARATOR ? 'OK' : "✔"), $link, $target];
        } catch (\Exception $e) {
            $this->statusCode = 1;
            $this->rows[] = [sprintf('<fg=red;options=bold>%s</>', '\\' === DIRECTORY_SEPARATOR ? 'ERROR' : "✘"), $link, sprintf('<error>%s</error>', $e->getMessage())];
        }
    }