Gets the physical path to the web assets (i.e. `/webroot`) directory of a library.

Parameters

  • string|boolean $library The name of the library for which to find the path, or `true` for the default library.

Returns

string Returns the physical path to the web assets directory for a library. For example, the `/webroot` directory of the default library would be `LITHIUM_APP_PATH . '/webroot'`.

Source

						public static function webroot($library = true) {
		if (!$config = Libraries::get($library)) {
			return null;
		}
		if (isset($config['webroot'])) {
			return $config['webroot'];
		}
		if (isset($config['path'])) {
			return $config['path'] . '/webroot';
		}
	}