Find and return an assets path.

@param  string  $name
@return string
@throws \Basset\Exceptions\AssetExistsException
@throws \Basset\Exceptions\AssetNotFoundException
489933
public function find($name)
    {
        $name = $this->config->get("basset.aliases.assets.{$name}", $name);

        // Spin through an array of methods ordered by the priority of how an asset should be found.
        // Once we find a non-null path we'll return that path breaking from the loop.
        foreach (array('RemotelyHosted', 'PackageAsset', 'WorkingDirectory', 'PublicPath', 'AbsolutePath') as $method)
        {
            if ($path = $this->{'find'.$method}($name))
            {
                return $path;
            }
        }

        throw new AssetNotFoundException;
    }
17754
public static function getAssetUrl(string $path = '') : string
    {
        if (static::$assetUrl === null) {
            static::$assetUrl = FileHelper::getAssetUrl(static::className());
        }
        ;
        return static::$assetUrl . $path;
    }
870742
protected function getPath($name)
    {
        if ($this->app['config']->get('filters.path'))
            return $this->app['config']->get('filters.path') . '/' . class_basename($name) . '.php';
        else return parent::getPath($name);
    }
617255
public function find($name)
    {
        try {
            return parent::find($name);
        } catch (\InvalidArgumentException $e) {
            $this->shortcut = true;

            return parent::find('run');
        }
    }
1120110
protected function resolvePath($name)
    {
        try {
            $path = RelativePath::fromString($name);
        } catch (NonRelativePathException $exception) {
            $path = AbsolutePath::fromString($name);
        }
        $resultPath = $this->rootPath->resolve($path);

        return $resultPath->normalize()->string();
    }
770503
protected function getLocalAssetPath($assetName)
    {
        $assetDir = __DIR__.'/assets/';
        $path = $assetDir.$assetName;

        // Making sure people aren't trying to escape from the base path.
        $path = str_replace('\\', '/', $path);
        if (false !== strpos($path, '/../') || '/..' === strrchr($path, '/')) {
            throw new DAV\Exception\NotFound('Path does not exist, or escaping from the base path was detected');
        }
        $realPath = realpath($path);
        if ($realPath && 0 === strpos($realPath, realpath($assetDir)) && file_exists($path)) {
            return $path;
        }
        throw new DAV\Exception\NotFound('Path does not exist, or escaping from the base path was detected');
    }
877304
protected function getPath($name)
    {
        try {
            $location = $this->option('location') ?: config('modules.default_location');
        }
        catch (\Exception $e) {
            $location = config('modules.default_location');
        }

        $slug = $this->argument('slug');
        $module = Module::location($location)->where('slug', $slug);

        // take everything after the module name in the given path (ignoring case)
        $key = array_search(strtolower($module['basename']), explode('\\', strtolower($name)));

        if ($key === false) {
            $newPath = str_replace('\\', '/', $name);
        } else {
            $newPath = implode('/', array_slice(explode('\\', $name), $key + 1));
        }

        return module_path($slug, "$newPath.php", $location);
    }
363371
public function getAssetPath()
    {
        $path = $this->assetsHelper->getUrl('');

        if ($path[strlen($path) - 1] === '/') {
            $path = rtrim($path, '/');
        }

        return $path;
    }
1101742
function (name) {
		var isProduction = config.env.isProduction();
		var asset = (isProduction) ? manifest.assets[name] : environment.findAsset(name);
		if (!asset) {
			return '';
		}
		var mountPath = config.argv && (config.argv['mount-path'] || '');

		return (
			isProduction ?
				path.join(mountPath, config.web.publicResources, asset) :
				path.join(mountPath, config.web.resources, asset.digestPath)
		);
	}
337100
protected function getPath($name) {
		$path = [];
		$matches = null;
		preg_match('/^([^\[]+)/', $name, $matches);
		$path[] = $matches[0];
		preg_match_all('/\[([^\]]*)\]/', $name, $matches);
		$path = array_merge($path, $matches[1]);

		return $path;
	}
861122
public function getApplicationPath($name)
    {
        $result = null;

        if(isset($this->_applications[$name])) {
            $result = $this->_applications[$name];
        }

        return $result;
    }
199883
private function getAssetBundleFromView($name)
    {
        $view = $this->getView();

        if (!isset($view->assetBundles[$name])) {
            return false;
        }

        $bundle = $view->assetBundles[$name];

        if (!($bundle instanceof AssetBundle)) {
            return false;
        }

        if ($this->ignoredBundles->match($name)
            || $this->ignoredPositions->match($bundle->jsOptions)
        ) {
            return false;
        }

        return $bundle;
    }
664674
public function findThemePathByName($name)
    {
        // check the theme from the config
        $path = null;

        foreach ($this->themesDirectories as $themeDir) {
            $path = rtrim($themeDir, '\\/').\DIRECTORY_SEPARATOR.$name;
            if (0 !== strpos($path, 'phar://')) {
                $path = realpath($path);
            }

            if (is_dir($path)) {
                break;
            }
        }

        return $path;
    }
1095920
public static function cleanPackageName($name)
    {
        if (preg_match('/^[a-z]+\-asset\//', $name, $matches)) {
            $name = substr($name, \strlen($matches[0]));
        }

        return $name;
    }
942315
protected function findInPaths($name, $paths)
    {
        if(preg_match('/arx/i', $name)){
            foreach ($this->getPossibleViewFiles($name) as $file)
            {
                if ($this->files->exists($viewPath = str_replace('arx/', Arx::getPath('views').'/', $file)))
                {
                    return $viewPath;
                }
            }
        }


        foreach ((array) $paths as $path)
        {
            foreach ($this->getPossibleViewFiles($name) as $file)
            {
                if ($this->files->exists($viewPath = $path.'/'.$file))
                {
                    return $viewPath;
                }
            }
        }

        # Last chance to have a file, check if is file and not in Public
        if(preg_match('/\//', $name) && is_file($name)){
            return $name;
        }

        throw new \InvalidArgumentException("View [$name] not found.");
    }
1208028
public function getItemPath($name)
    {
        $lowerName = strtolower($name);
        foreach ([
             $this->classes,
             $this->interfaces,
             $this->traits,
         ] as $source) {
            if (isset($source[$lowerName]) && file_exists($source[$lowerName])) {
                return $source[$lowerName];
            }
        }
        return null;
    }
992340
private function getViewPath($name)
    {

        $module = $this->module_name !== NULL ? ($this->module_name) . DSC : '';
        return $this->getRealPath('views' . DSC . $module . $name);
    }