[resolveAssetPath description]

@param string $path [description]

@return [type] [description]
350396
public function resolveAssetPath($path = '')
    {
        $cwd = getcwd();

        foreach ($this->baseDirectories as $dirs) {
            foreach ($dirs as $dir) {
                $file = $dir.'/www/'.$path;

                $srcDir = dirname($file);
                $destDir = dirname($cwd.'/'.$path);

                if (!is_dir($srcDir)) {
                    continue;
                }

                if ($srcDir != $destDir) {
                    $this->copy($srcDir, $destDir);
                    break 2;
                }
            }
        }

        foreach ($this->baseDirectories as $dirs) {
            foreach ($dirs as $dir) {
                $file = $dir.'/www/'.$path;

                if (is_readable($file)) {
                    return URL::base().$path;
                }
            }
        }
    }
17754
public static function getAssetUrl(string $path = '') : string
    {
        if (static::$assetUrl === null) {
            static::$assetUrl = FileHelper::getAssetUrl(static::className());
        }
        ;
        return static::$assetUrl . $path;
    }
996142
public function getPathRelativeToDirectory($path)
    {
        // Get the last segment of the directory as asset paths will be relative to this
        // path. We can then replace this segment with nothing in the assets path.
        $directoryLastSegment = substr($this->path, strrpos($this->path, '/') + 1);

        return trim(preg_replace('/^'.$directoryLastSegment.'/', '', $path), '/');
    }
199252
protected function resolveExtensionName($path)
    {
        preg_match("/src(.*?)src/", dirname($path), $match);
        if (!isset($match[1])) {
            throw new \Exception('Unable to resolve valid module path');
        }
        $name = trim($match[1], DIRECTORY_SEPARATOR);
        if (!starts_with($name, ['components', 'modules'])) {
            return false;
        }
        return str_replace('\\', '/', $name);
    }
1255915
public function resolve($path)
    {
        return $this->service->getObjectUrl(
            $this->bucket,
            ltrim($this->baseDir . '/' . ltrim($path, '/'), '/')
        );
    }
1247472
private function getAssetUrl($path)
    {
        $url = $this->assetsPackages->getUrl($path);
        if (!$url) {
            return $path;
        }

        /**
         * If `framework.assets.version: some_version` set, then $version = '?some_version'.
         * If `framework.assets: json_manifest_path` is used, then $version = '/'.
         */
        $version = $this->assetsPackages->getVersion($path);
        if (false === strpos($version, '?')) {
            return $url;
        }

        return preg_replace('/\?' . $version . '/', '', $url);
    }
384095
public function resolveLocalPath($path)
    {
        if (is_array($path)) {
            $paths  = array();
            foreach ($path as $p) {
                $paths[]    = $this->resolveLocalPath($p);
            }
            return $paths;
        } else {
            $path   = FileSystem::normalizeDirectorySeparator($path);
            if (strpos($path, $this->getRepositoryPath()) === 0) {
                $path  = substr($path, strlen($this->getRepositoryPath()));
            }
            return ltrim($path, '/');
        }
    }
271554
public static function resolvePath(array &$files, $path)
    {
        if (is_array($path)) {
            $files = \array_merge($files, $path);
        } else {
            $files[] = $path;
        }
        return \array_unique($files);
    }
1081521
public static function fixPath(string $path): string
    {
        if (false !== strpos($path, '\\')) {
            $path = str_replace('\\', '/', $path);
        }
        while (false !== strpos($path, '//')) {
            $path = str_replace('//', '/', $path);
        }
        if (strlen($path)) {
            if ('/' === substr($path, 0, 1)) {
                $path = ltrim($path, '/');
            }
            if ('/' === substr($path, -1, 1)) {
                $path = rtrim($path, '/');
            }
        }

        return $path;
    }
317378
protected static function getPharPath($path)
    {
        $path = self::realPath($path);
        return str_replace(self::PHAR_PREFIX, '', $path);
    }
1272960
public function resolveArrayPath($path)
    {
        $path = explode('.', $this->escape($path));
        $root = $path[0];
        unset($path[0]);

        $arrayPath = '["'.implode('"]["', $path).'"]';

        $arrayBracket = '->';
        $arrayBracketEnd = '';

        if ($this->isArray()) {
            $arrayBracket = '["';
            $arrayBracketEnd = '"]';
        }

        return '$this->object'.$arrayBracket.$root.$arrayBracketEnd.$arrayPath;
    }
1023803
private function addPath($path)
    {
        $path = $this->resolvePath($path);

        if ($this->validatePath($path)) {
            $this->paths[] = $path;
        }

        return $this;
    }
1041455
public function resolve($path)
    {
        $path = str_replace('/', '.', preg_replace('/\/:\w+/', '', $path));

        $finder = $this->container['view.finder'];

        try {
            $finder->find($path);
        } catch (InvalidArgumentException $e) {
            $explodedPath = explode('.', $path);


            if ($explodedPath[0] === 'static') {
                return null;
            }

            if (count($explodedPath) > 1) {
                $explodedPath[0] = 'shared';
                $explodedPath = array('shared', end($explodedPath));
                try {
                    $finder->find(implode('.', $explodedPath));
                    $path = implode('.', $explodedPath);
                } catch (InvalidArgumentException $e) {
                    $this->app->error($e);
                }
            }
        }

        return $path;
    }
515445
public function asset_path($path)
	{
		if ($this->active['path'] === null)
		{
			throw new \ThemeException('You must set an active theme.');
		}

		if ($this->active['asset_base'])
		{
			return $this->active['asset_base'].$path;
		}
		else
		{
			return $this->active['path'].$path;
		}
	}
63973
public function getEngineFromPath($path)
    {
        $extension = $this->getExtension($path);

        $engine = $this->extensions[$extension];

        return $this->engines->resolve($engine);
    }
908582
public function resolve($path)
    {
        if ($path[0] !== '@') {
            return DIRECTORY_SEPARATOR === '/' ? $path : strtr($path, '\\', '/');
        }

        if (strpos($path, '{') !== false && preg_match_all('#{([^\}]+)}#', $path, $matches)) {
            foreach ((array)$matches[1] as $k => $match) {
                if (is_numeric($match)) {
                    $replaced = substr(function_exists('random_bytes') ? bin2hex(random_bytes($match / 2 + 1)) : md5(uniqid(mt_rand(), true)), 0, $match);
                } else {
                    /** @noinspection UnSafeIsSetOverArrayInspection */
                    $ts = isset($ts) ? $ts : time();
                    $replaced = date($match, $ts);
                }

                $path = str_replace($matches[0][$k], $replaced, $path);
            }
        }

        if (DIRECTORY_SEPARATOR === '\\') {
            $path = strtr($path, '\\', '/');
        }

        if (($pos = strpos($path, '/')) === false) {
            if (!isset($this->_aliases[$path])) {
                throw new InvalidArgumentException(['`:alias` is not exists', 'alias' => $path]);
            }
            return $this->_aliases[$path];
        }

        $alias = substr($path, 0, $pos);

        if (!isset($this->_aliases[$alias])) {
            throw new InvalidArgumentException(['`:alias` is not exists for `:path`', 'alias' => $alias, 'path' => $path]);
        }

        return $this->_aliases[$alias] . substr($path, $pos);
    }
1220375
protected function getPath($path)
    {
        $pathsFile = __DIR__.'/../../../../../config/rinvex.composable.php';
        $paths = file_exists($pathsFile) ? require $pathsFile : [];

        return $paths[$path] ?? __DIR__.$this->paths[$path];
    }