classes/Files/PathResolver.php
public function resolve($path)
	{
		$paths = [];

		foreach ($this->paths as $configuredPath) {
			$paths[] = $configuredPath.'/'.$path;
		}

		$parts = explode('/', $path);

		// this doesn't change behaviour but will save some performance
		if (count($parts) == 1) {
			return $paths;
		}

		$current = '';
		$mountPaths = [];
		foreach ($parts as $part) {
			if ($current) {
				$current .= '/'.$part;
			} else {
				$current = $part;
			}

			if (isset($this->mounts[$current])) {
				foreach ($this->mounts[$current] as $mount) {
					// relative to mount directory
					$relativePath = str_replace($current, '', $path);
					$mountPaths[] = $mount.$relativePath;
				}
			}
		}

		return array_merge($mountPaths, $paths);
	}
public function resolve($path)
	{
		$paths = [];

		foreach ($this->paths as $configuredPath) {
			$paths[] = $configuredPath.'/'.$path;
		}

		$parts = explode('/', $path);

		// this doesn't change behaviour but will save some performance
		if (count($parts) == 1) {
			return $paths;
		}

		$current = '';
		$mountPaths = [];
		foreach ($parts as $part) {
			if ($current) {
				$current .= '/'.$part;
			} else {
				$current = $part;
			}

			if (isset($this->mounts[$current])) {
				foreach ($this->mounts[$current] as $mount) {
					// relative to mount directory
					$relativePath = str_replace($current, '', $path);
					$mountPaths[] = $mount.$relativePath;
				}
			}
		}

		return array_merge($mountPaths, $paths);
	}
Resolve possible paths for a relative path.

@param  string $path

@return array