because of the ability to change the context of the public folder some icons like favico, sitemap, robots.txt are still best served in root
346263
function(arrPathFromRoot) {
		if (arrPathFromRoot) {
			let routes = {};
			for (let pathFromRoot of arrPathFromRoot) {
		    routes['/' + pathFromRoot] = {
		    	get: function(req, res) {
			      web.utils.serveStaticFile(path.join(web.conf.publicDir, pathFromRoot), res);
			    }
		    }
		  }

		  return routes;
		}

		return null;
	}
251421
private function define_public_hooks() {

		$plugin_public = new Dynamic_Image_Resizer_Public( $this->get_plugin_name(), $this->get_version() );

		$this->loader->add_action( 'max_srcset_image_width', $plugin_public, 'disable_max_srcset_image_width' );
		$this->loader->add_action( 'image_downsize', $plugin_public, 'resize_image', 10, 3 );

	}
146341
protected void updateRoot(CmsObject rootCms, CmsResource siteRootResource) {

        m_root = siteRootResource;
        m_currentCms = rootCms;
        updateView();
    }
1229932
private function createCoreImages()
    {
        Helper::createFolderIfNoExist(PATH_HOME . "assetsPublic/img");
        $config = json_decode(file_get_contents(PATH_HOME . "_config/config.json"), true);
        copy(PATH_HOME . VENDOR . "config/public/assets/dino.png", PATH_HOME . "assetsPublic/img/dino.png");
        copy(PATH_HOME . VENDOR . "config/public/assets/file.png", PATH_HOME . "assetsPublic/img/file.png");
        copy(PATH_HOME . VENDOR . "config/public/assets/save.gif", PATH_HOME . "assetsPublic/img/save.gif");
        copy(PATH_HOME . VENDOR . "config/public/assets/file_type.svg", PATH_HOME . "assetsPublic/img/file_type.svg");
        copy(PATH_HOME . VENDOR . "config/public/assets/image-not-found.png", PATH_HOME . "assetsPublic/img/img.png");

        if(file_exists(PATH_HOME . (!empty($config['favicon']) ? "uploads/site/favicon.png" : VENDOR . "config/public/assets/favicon.png")))
        copy(PATH_HOME . (!empty($config['favicon']) ? "uploads/site/favicon.png" : VENDOR . "config/public/assets/favicon.png"), PATH_HOME . "assetsPublic/img/favicon.png");

        if(!empty($config['logo']) && file_exists(PATH_HOME . "uploads/site/logo.png"))
            copy(PATH_HOME . "uploads/site/logo.png", PATH_HOME . "assetsPublic/img/logo.png");

        elseif(file_exists(PATH_HOME . "assetsPublic/img/logo.png"))
            unlink(PATH_HOME . "assetsPublic/img/logo.png");
    }
758334
def asset_root
      File.expand_path(File.join(File.dirname(__FILE__),
                                 %w(.. .. ..),
                                 %w(assets aker form)))
    end
1290290
function(callback) {
            // Optional permission modification
            if (disablePerms) {
              callback();
              return;
            }
            
            grunt.verbose.writeln('changing file perms...');

            // 511 = 0777 octal
            ftpout.raw.site('chmod', (file.mode & 511).toString(8), file.dest, function(err) {
              // Windows and some hosts don't implement the CHMOD site extension
              if (err && err.code !== 502 && err.code !== 504) {
                done(err);
                return;
              }

              grunt.verbose.writeln('done changing perms');
              callback();
            });
          }
512491
function menu_icon( $icon = "dashicons-admin-page" ) {

        if ( is_string( $icon ) && stripos( $icon, "dashicons" ) !== false ) {

            $this->options["menu_icon"] = $icon;

        } else {

            // Set a default menu icon
            $this->options["menu_icon"] = "dashicons-admin-page";
        }
    }
1292294
function setResourcePaths( root){
  rootPath = root;
  router.setPathToContent       ( root + '/app/content');
  renderer.setPathToTemplates   ( root + '/app/templates');
  renderer.setPathToModules     ( root + '/app/modules');
  renderer.setPathToStaticFiles ( root + '/app/static');
  console.info( 'running from %s', root);
}
525305
private function updateRootDirOnTargetFile(): void
    {
        $realTemplateTestsPath = realpath(self::ROOT_TEMPLATE_PATH . self::TEST_DIR);
        if (0 === \strpos($this->templateFile->getPath(), $realTemplateTestsPath)) {
            $updatedPath = str_replace(
                '/src/',
                '/tests/',
                $this->targetFile->getPath()
            );
            $this->targetFile->setPath($updatedPath);
        }
    }
71842
function getDefaultTypeRoots(currentDirectory, host) {
        if (!host.directoryExists) {
            return [ts.combinePaths(currentDirectory, nodeModulesAtTypes)];
        }
        var typeRoots;
        while (true) {
            var atTypes = ts.combinePaths(currentDirectory, nodeModulesAtTypes);
            if (host.directoryExists(atTypes)) {
                (typeRoots || (typeRoots = [])).push(atTypes);
            }
            var parent_15 = ts.getDirectoryPath(currentDirectory);
            if (parent_15 === currentDirectory) {
                break;
            }
            currentDirectory = parent_15;
        }
        return typeRoots;
    }
155480
protected function addFavicon()
	{
		// Get the default value in config file if not manually defined
		$favicon = ($this->favicon) ? $this->favicon : $this->getConfig('favicon');

		// Check if value is not empty
		if ($favicon)
		{
			// Check if .ico file exists
			if (File::exists(public_path($favicon.'.ico')))
			{
				$this->addOneLink('shortcut icon', asset($favicon.'.ico'));
				$this->addOneLink('icon', asset($favicon.'.ico'), 'image/x-icon');
			}

			// Check if .png file exists
			if (File::exists(public_path($favicon.'.png')))
			{
				$this->addOneLink('icon', asset($favicon.'.png'), 'image/png');
			}
		}
	}
762495
function (rootdir, configData, platform, preferenceMappingData) {
        var preferences = lib.getPreferences(rootdir, platform),
            type = 'preference';

        if (!platform) {
            platform = 'generic';
        }

        preferences.forEach(function (preference) {
            // check if there are specific configuration to map to config for this platform
            if (!preferenceMappingData || !preferenceMappingData[platform]) {
                return;
            }

            var prefMappingData = preferenceMappingData[platform][preference.attrib.name],
                target,
                prefData;

            if (prefMappingData) {
                prefData = {
                    parent: prefMappingData.parent,
                    type: type,
                    destination: prefMappingData.destination,
                    data: preference,
                    map: prefMappingData
                };

                target = prefMappingData.target;
                if (!configData[target]) {
                    configData[target] = [];
                }
                configData[target].push(prefData);
            }
        });
    }
1185127
def __fix_context(context):
    

    COPY_LISTS = ('script_files', 'css_files',)

    for attr in COPY_LISTS:
        if attr in context:
            context[attr] = context[attr][:]

    return context
805784
private function display_dot_org_overrides() {
		$plugins         = Singleton::get_instance( 'Plugin', $this )->get_plugin_configs();
		$themes          = Singleton::get_instance( 'Theme', $this )->get_theme_configs();
		$dashicon_plugin = '<span class="dashicons dashicons-admin-plugins"></span>&nbsp;&nbsp;';
		$dashicon_theme  = '<span class="dashicons dashicons-admin-appearance"></span>&nbsp;&nbsp;';

		/**
		 * Filter to return array of overrides to dot org.
		 *
		 * @since 8.5.0
		 * @return array
		 */
		$overrides = apply_filters( 'github_updater_override_dot_org', [] );

		if ( ! empty( $overrides ) ) {
			echo '<h4>' . esc_html__( 'Overridden Plugins and Themes', 'github-updater' ) . '</h4>';
			echo '<p>' . esc_html__( 'The following plugins or themes might exist on wp.org, but any updates will be downloaded from their respective git repositories.', 'github-updater' ) . '</p>';

			foreach ( $plugins as $plugin ) {
				if ( in_array( $plugin->file, $overrides, true ) ) {
					echo '<p>' . $dashicon_plugin . $plugin->name . '</p>';
				}
			}
			foreach ( $themes as $theme ) {
				if ( in_array( $theme->slug, $overrides, true ) ) {
					echo '<p>' . $dashicon_theme . $theme->name . '</p>';
				}
			}
			echo '<br>';
		}
	}
276794
protected function getHooksDirectorySetting() {
    // Set the module folder based on variable.
    $directory = $this->getSetting('data_directory', 'hooks');

    // Run it through version-specific stuff.
    // This basically prepends 'public://' or 'sites/default/files/'.
    $this->version_helper->directoryPath($directory);

    $this->hooks_directory = $directory;
  }
187838
private void cloneExplorerTypeIcons(Map<String, String> iconPaths) throws CmsException {

        for (Map.Entry<String, String> entry : iconPaths.entrySet()) {
            String source = ICON_PATH + entry.getKey();
            String target = ICON_PATH + entry.getValue();
            if (getCms().existsResource(source) && !getCms().existsResource(target)) {
                getCms().copyResource(source, target);
            }
        }
    }
1179157
private void saveFavIcon(String siteRoot) {

        if (m_os == null) {
            return;
        }
        if (m_os.size() == 0) {
            return;
        }

        getReport().println(Messages.get().container(Messages.RPT_SITE_SET_FAVICON_0), I_CmsReport.FORMAT_DEFAULT);
        CmsResource favicon = null;
        try {
            favicon = m_cms.createResource(
                siteRoot + CmsSiteManager.FAVICON,
                OpenCms.getResourceManager().getResourceType(CmsResourceTypeImage.getStaticTypeName()));
        } catch (CmsVfsResourceAlreadyExistsException e) {
            //OK, Resource already there
            try {
                favicon = m_cms.readResource(siteRoot + CmsSiteManager.FAVICON);
            } catch (CmsException e2) {
                //no, it wasn't..
                getReport().println(
                    Messages.get().container(Messages.RPT_SITE_ERROR_FAVICON_0),
                    I_CmsReport.FORMAT_ERROR);
                getReport().println(e);
                getReport().println(e2);
                return;
            }
        } catch (CmsIllegalArgumentException | CmsException e) {
            getReport().println(Messages.get().container(Messages.RPT_SITE_ERROR_FAVICON_0), I_CmsReport.FORMAT_ERROR);
            getReport().println(e);
            return;
        }
        try {
            m_cms.lockResource(siteRoot + CmsSiteManager.FAVICON);
            CmsFile faviconFile = new CmsFile(favicon);
            faviconFile.setContents(m_os.toByteArray());
            m_cms.writeFile(faviconFile);
            m_cms.unlockResource(siteRoot + CmsSiteManager.FAVICON);
        } catch (CmsException e) {
            getReport().println(Messages.get().container(Messages.RPT_SITE_ERROR_FAVICON_0), I_CmsReport.FORMAT_ERROR);
            getReport().println(e);
            return;
        }

    }