public function createLinks($web) {
        $web = Path::ds($web, true);

        foreach ($this->getModules() as $key => $module) {
            $moduleWeb = $module->getPath() . 'web' . Path::SEPARATOR;

            if (!file_exists($moduleWeb)) {
                continue;
            }

            $targetLink = $web . $key . Path::SEPARATOR;

            // Create symlink if folder doesn't exist
            if (!file_exists($targetLink)) {
                symlink($moduleWeb, $targetLink);

            // Throw an error if file exists but is not a symlink
            } else if (is_file($targetLink) && !is_link($targetLink)) {
                throw new AssetSymlinkException(sprintf('Webroot folder %s must not exist so that static assets can be symlinked', $key));
            }
        }
    }