getPath

@param string $path
@return string
498031
private function getPath(string $path) : string
  {
    $path = str_replace('"', "", $path);
    $path = str_replace("'", "", $path);

    $views = self::$views;
    $file = explode('.', $path);

    foreach($file as $name) {
      if (is_dir($views . DIRECTORY_SEPARATOR . $name)) {
        $views = $views . DIRECTORY_SEPARATOR . $name . DIRECTORY_SEPARATOR;
      }
      else {
        $views = $views . (ends_with($views, '/') ? '' : '.') . $name;
      }
    }

    $parent = substr(self::$views, strrpos(self::$views, DIRECTORY_SEPARATOR) + 1);

    if (str_contains($views, $parent . '.')) {
      $views = str_replace($parent . '.', $parent . DIRECTORY_SEPARATOR, $views);
    }

    return str_replace(self::$views, '', $views);
  }
383617
public function find(string $path)
    {
        if (! file_exists($path)) {
            $path = $this->viewFinder->find($path);
        }

        return $path;
    }
1148429
public function path($path = '')
    {
        $appPath = $this->appPath ?: $this->basePath.DIRECTORY_SEPARATOR.'app';

        return $appPath.($path ? DIRECTORY_SEPARATOR.$path : $path);
    }
956996
public function find($path)
    {
        foreach (array_keys($this->pathLookupTable) as $key) {
            if (starts_with($path, $key)) {
                return $key;
            }
        }
    }
665910
protected function getPath($path)
    {
        // If not specific theme name, so widget will creating as global.
        if ( ! $this->argument('theme'))
        {
            return base_path('resources/views/'.$path);
        }

        $rootPath = $this->option('path');

        return $rootPath.'/'.$this->getTheme().'/' . $path;
    }
593740
protected function safePath($path)
    {
        $path = str_replace('\\', '/', $path);
        $path = preg_replace('/(\.+\\/)/', './', $path);
        $path = preg_replace('/(\\/+)/', '/', $path);
        return $path;
    }
924588
protected function realpath($path)
    {
        if ($path === '') {
            return $this->baseDir;
        }

        if ($path[0] === '/' || $path[1] === ':') {
            return $path;
        }

        return $this->baseDir . '/' . $path;
    }
87538
static public function urlToPath($path)
    {
        $path = parse_url($path);
        return $path === null ? null : str_replace('/', DIRECTORY_SEPARATOR, $path['path']);
    }
353315
protected static function getRelativePath($path)
	{
		preg_match('/([[:alpha:]]*):\/\/(.*)/', $path, $name);

		if (isset($name[2]) && $name[2])
		{
			return $name[2];
		}

		return $path;
	}
351071
public function resourcePath($path = '')
    {
        if ($this->resourcePath) {
            return $this->resourcePath.($path ? '/'.$path : $path);
        }

        return $this->basePath('resources'.($path ? '/'.$path : $path));
    }
317963
public static function getFolder(string $path)
    {
        $arrFolders = explode(DIRECTORY_SEPARATOR, $path);
        $fullPath = "";
        if ($arrFolders[0] !== "") {
            $fullPath = $arrFolders[0];
        }
        unset($arrFolders[0]);
        foreach ($arrFolders as $folder) {
            $fullPath .= DIRECTORY_SEPARATOR . $folder;
            if (file_exists($fullPath) && is_dir($fullPath)) {
                continue;
            }
            mkdir($fullPath, 0775);
        }
        return $path;
    }
412227
private function locatePath($path)
    {
        if ($this->isAbsolutePath($path)) {
            return $path;
        }

        return $this->basePath . DIRECTORY_SEPARATOR . $path;
    }
1205233
public function getPathUrl($path)
    {
        $path = $this->validatePath($path);

        $fullPath = $this->storagePath.implode("/", array_map("rawurlencode", explode("/", $path)));

        return Url::to($fullPath);
    }
255417
public function get($path)
    {
        $return = null;
        $path = \preg_split('#[./]#', $path);
        $depth = 0;
        while ($path) {
            $key = \array_shift($path);
            if ($depth == 0) {
                if ($key == 'currentPage') {
                    $return = $this->data['pages'][ $this->data['i'] ];
                } elseif ($key == 'nextI') {
                    foreach ($this->data['pages'] as $i => $page) {
                        if (!$page['completed']) {
                            return $i;
                        }
                    }
                // } elseif ($key == 'submitted') {
                    // return $this->data['submitted'];
                } elseif (isset($this->data[$key])) {
                    $return = $this->data[$key];
                } elseif (isset($this->data['persist'][$key])) {
                    $return = $this->data['persist'][$key];
                } else {
                    return null;
                }
            } elseif (isset($return[$key])) {
                $return = $return[$key];
            } else {
                return null;
            }
            $depth++;
        }
        return $return;
    }
428818
public function getRemainingPath($path)
	{
		$paths = explode('/', $path);
		
		$newPaths	= array();

		for($i = count(explode('/', $this->properties['path'])); $i < count($paths); $i++)
			$newPaths[]	= $paths[$i];

		return $this->properties['path'] != '' ? implode('/', $newPaths) : $path;
	}
927834
protected function _path($path) {
		return $this->rootName.($path == $this->root ? '' : $this->separator.$this->_relpath($path));
	}
720457
public function getUrl($path)
    {
        $path = $this->getPathFromUrl($path);
        $url = $this->storageUrl . $path;
        
        return $url;
    }