Back to WebAssetItem class

Method isPathAbsolute

protected bool
isPathAbsolute
(string $path)
Check if the Path is relative to /media folder or absolute
Parameters
  • string $path Path to test
Returns
  • bool
Since
  • 4.0.0
Class: WebAssetItem
Project: Joomla

Method isPathAbsolute - Source code

/**
 * Check if the Path is relative to /media folder or absolute
 *
 * @param   string  $path  Path to test
 *
 * @return  boolean
 *
 * @since   4.0.0
 */
protected function isPathAbsolute(string $path) : bool
{
    // We have a full path or not
    return is_file(JPATH_ROOT . '/' . $path);
}