src/Url.php
public static function isLocal($url)
    {
        $components = self::parse($url);

        if (isset($components[self::SCHEME]) && $components[self::SCHEME] !== 'file') {
            return false;
        }

        if (isset($components[self::HOST])) {
            return false;
        }

        return true;
    }
public static function isLocal($url)
    {
        $components = self::parse($url);

        if (isset($components[self::SCHEME]) && $components[self::SCHEME] !== 'file') {
            return false;
        }

        if (isset($components[self::HOST])) {
            return false;
        }

        return true;
    }
Check if $url is a local file path

@param $url
@return bool
@throws \Exception