Get the path of the given theme file.

@param  string  $file
@param  string  $theme
@return string
184358
public function path($file = '', $theme = null)
    {
        if (is_null($theme)) {
            $theme = $this->getCurrent();
        }

        $theme = $this->format($theme);

        return base_path("themes/{$theme}/{$file}");
    }
1109714
protected function getThemeBaseUrl(?Theme $theme = null) : string
    {
        $theme = $theme ?? $this->getTheme();

        if (isset($this->webPaths[$theme->getKey()])) {
            return $this->webPaths[$theme->getKey()];
        }

        return $this->webPaths[$theme->getKey()] = $this->url->make(new UrlSettings([
            'domain'        => $theme->getWebPath(),
            'path'          => $this->directory,
        ]));
    }
473535
public static function getFilename($theme, $type)
    {
        $filename = 'themes/' . $theme . '.' . $type;
        if (file_exists(Yii::getAlias(self::$assetsDirectory) . $filename)) {
            return $filename;
        }
        return false;
    }
844731
protected function getBasePath(Theme $theme = null) : string
    {
        $theme = $theme ?? $this->getTheme();

        if (isset($this->fullPaths[$theme->getKey()])) {
            return $this->fullPaths[$theme->getKey()];
        }

        return $this->fullPaths[$theme->getKey()] = $this->createPath($theme->getPath(), $this->directory);
    }
615775
protected function getFilePath($file)
    {
        // if were passed an instance of UploadedFile, return the path
        if ($file instanceof UploadedFile) {
            return $file->getPathname();
        }

        // if we're passed a PHP file upload array, return the "tmp_name"
        if (is_array($file) && null !== array_get($file, 'tmp_name')) {
            return $file['tmp_name'];
        }

        // fallback: we were likely passed a path already
        return $file;
    }
280732
public static function base_path(?string $file = null)
  {
    $file = (substr($file, 0, 1) == DIRECTORY_SEPARATOR ? substr($file, 1) : $file);
    return config('app.dir') . $file;
  }
832024
def get_path():
    
    # Theme directory is defined as our parent directory
    return os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
1354499
public function find($theme)
	{
		foreach ($this->paths as $path)
		{
			if (is_dir($path.$theme))
			{
				return $path.$theme.DS;
			}
		}

		return false;
	}
1272167
public function getFilePath($fileName = null)
    {
        if ($fileName === null) {
            $fileName = $this->fileName;
        }

        return $this->theme->getPath().'/'.$this->dirName.'/'.$fileName;
    }
230000
public function find(&$file)
    {
        list($package, $file) = StringHelper::explode($this->separator, $file, 2, 'array_unshift');

        if (!$package) {
            return false;
        }

        $package = $this->packageResolver->getPackage($package);

        if (!$package) {
            return false;
        }

        return $package->getDir() . '/Templates';
    }
790655
private static function cadenaoriginal_path($file = '')
    {
        if (null !== static::$default_xslt_directory) {
            $directory = static::$default_xslt_directory;
        }
        else {
            $directory = realpath(__DIR__) . DIRECTORY_SEPARATOR . 'xslt33';
            if (!file_exists($directory)) mkdir($directory, 0775, true);
        }

        return $directory . ($file ? '/' . $file : '');
    }
983925
public function getPicturePath($file, $admin = false, $lang = null, $shop = null, $theme = null)
    {
        return $this->getDir($file, $this->_sPictureDir, $admin, $lang, $shop, $theme);
    }
136050
public function getImagePath($file, $admin = false)
    {
        return $this->getDir($file, $this->_sImageDir, $admin);
    }
933462
public static function pathInfo($file)
    {
        $result = self::_pathInfo($file);
        return self::i()->dump($result, '! pathInfo (' . $file . ') !');
    }
294493
public function find($themeName)
    {
        foreach ($this->getDirectories() as $directory) {
            if (! str_contains($directory, $themeName)) {
                continue;
            }

            return $this->getThemeInfoForPath($directory);
        }

        throw new ThemeNotFoundException($themeName);
    }
169636
protected function findTemplateFile($file)
    {
        //Add missing extension
        $ext = pathinfo($file, PATHINFO_EXTENSION);
        $file = ($ext === '') ? $file . '.'.$this->getExtension() : $file;

        $found = false;
        foreach ($this->locations as $location) {
            if (is_file($location . '/' . $file)) {
                $found = true;
                $file = $location . '/' . $file;
                continue;
            }
        }

        if (!$found) {
            throw new TemplateNotFoundException('This template was not found in any of the registered locations: ' . $file);
        }

        return $file;
    }
638155
public function HashFile($path, $theme = true)
    {
        $path = $theme ? $this->getPath($path) : $path;

        if (file_exists($path)) {
            $hash = md5_file($path);
            return str_replace(array('/', '+', '='), '', base64_encode(pack('H*', $hash)));
        }

        return '';
    }