<?php
namespace Claromentis\Core\Assets\Storage;

$GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"] ?: array()) + array("_8a36a84baeffc008" . "5672f9bf9c064f67" => base64_decode("ZmlsZV9wdXRfY29udGVu" . "dHM="), "_f2c48e9313746f8d37d4c876be7" . "851ea" => base64_decode("Y2htb" . "2Q="), "_418406d16c6e7afe5a5c3500862" . "3ca3a" => base64_decode("Y29weQ=" . "="), "_8a541226dcdfe6bff96c" . "3e7f199904f1" => base64_decode("dG91" . "Y2g="), "_6bf19ac66af25b2e2dab6bd4" . "e14c324d" => base64_decode("aXNfZGl" . "y"), "_87daa84e346f6420a" . "3f3426e05d16a7b" => base64_decode("Lw=" . "="), "_3ce655ae4a14421967cc023" . "a6e907ed5" => base64_decode("aXNfZml" . "sZQ=="), "_c61584fc35" . "80dd88e33b6" . "fb5cfbc0325" => base64_decode("bWtk" . "aXI="), "_f103591560ebc2f5d5b8a9897d" . "10fee9" => base64_decode("ZmlsZW10a" . "W1l"), "_ca831b25ce7ff" . "fea9cf441f762c" . "7d154" => base64_decode("ZmlsZV9leGlzdH" . "M="));
use Claromentis\Core\Filesystem\Exception\FileNotFoundException;




class NativeStorage implements StorageInterface
{
    
    
    
    
    
    
    protected string $cache_path;
    
    
    
    
    
    
    protected string $cache_url;
    
    
    
    
    
    
    protected ?string $public_cache_path;
    
    
    
    
    
    
    
    
    public function __construct(string $_97dcb980872ef5ddd551c02d81b4e8ae, string $_92d8dfbd2f5d72bf3831907d3771001d, ?string $_d03bcea98d5dd93ba7561c9865612cb9 = null)
    {
        $this->cache_path = $_97dcb980872ef5ddd551c02d81b4e8ae;
        $this->cache_url = $_92d8dfbd2f5d72bf3831907d3771001d;
        $this->public_cache_path = $_d03bcea98d5dd93ba7561c9865612cb9;
    }
    
    
    
    
    
    
    
    
    
    
    
    public function GetCacheFileLocalPath(string $filename) : string
    {
        if (!$this->CacheFileExists($filename)) {
            throw new FileNotFoundException();
        }
        $_c52bbd17a1963ef1954f5ada98102e06 = $this->GetCacheFilePath($filename);
        $_911c0b062de431dc2ab525c23c80a114 = $this->GetPublicCacheFilePath($filename);
        if ($this->public_cache_path && !$GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_3ce655ae4a14421967cc023a6" . "e907ed5"]($_911c0b062de431dc2ab525c23c80a114)) {
            $this->CreatePublicCacheDirectory();
            $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_418406d16c6e7afe5a5c35008623" . "ca3a"]($_c52bbd17a1963ef1954f5ada98102e06, $_911c0b062de431dc2ab525c23c80a114);
        }
        return $_c52bbd17a1963ef1954f5ada98102e06;
    }
    public function GetCacheFileUrl(string $_93469c9375390f862eebb779f8b740e4) : string
    {
        return $this->cache_url . $GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_87daa84e346f6420a3f3426e0" . "5d16a7b"] . $_93469c9375390f862eebb779f8b740e4;
    }
    public function CacheFileExists(string $_93469c9375390f862eebb779f8b740e4) : bool
    {
        return $GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_ca831b25ce7fffea9cf441" . "f762c7d154"]($this->GetCacheFilePath($_93469c9375390f862eebb779f8b740e4));
    }
    public function CreateCacheDirectory()
    {
        if (!$GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_6bf19ac66af25b2e2d" . "ab6bd4e14c324d"]($this->cache_path)) {
            $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_c61584fc3580dd88e33b6fb5cfbc032" . "5"]($this->cache_path, 0775, true);
            $GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_f2c48e9313746f8d" . "37d4c876be7851ea"]($this->cache_path, 0775);
        }
        $this->CreatePublicCacheDirectory();
    }
    public function StoreCacheFile(string $_93469c9375390f862eebb779f8b740e4, string $_d34599daeb8cca374d3adb38b245839c)
    {
        $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_8a36a84baeffc0085672f9" . "bf9c064f67"]($this->GetCacheFilePath($_93469c9375390f862eebb779f8b740e4), $_d34599daeb8cca374d3adb38b245839c);
        if (isset($this->public_cache_path)) {
            $GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_8a36a84baeffc0085672f9b" . "f9c064f67"]($this->GetPublicCacheFilePath($_93469c9375390f862eebb779f8b740e4), $_d34599daeb8cca374d3adb38b245839c);
        }
    }
    public function GetCacheFileModifiedTime(string $_93469c9375390f862eebb779f8b740e4)
    {
        return $GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_f103591560ebc2f5d5b8a9897d10f" . "ee9"]($this->GetCacheFilePath($_93469c9375390f862eebb779f8b740e4));
    }
    public function TouchCacheFile(string $_93469c9375390f862eebb779f8b740e4)
    {
        $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["_8a541226d" . "cdfe6bff96" . "c3e7f19990" . "4f1"]($this->GetCacheFilePath($_93469c9375390f862eebb779f8b740e4));
    }
    
    
    
    
    
    
    
    protected function GetCacheFilePath(string $_93469c9375390f862eebb779f8b740e4) : string
    {
        return $this->cache_path . $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_87daa84e346f6" . "420a3f3426e05d" . "16a7b"] . $_93469c9375390f862eebb779f8b740e4;
    }
    
    
    
    
    
    
    
    protected function GetPublicCacheFilePath(string $_93469c9375390f862eebb779f8b740e4) : string
    {
        return $this->public_cache_path . $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_87daa84e346f64" . "20a3f3426e05d16" . "a7b"] . $_93469c9375390f862eebb779f8b740e4;
    }
    protected function CreatePublicCacheDirectory()
    {
        if (isset($this->public_cache_path) && !$GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_6bf19ac66af25b2e2dab6bd4" . "e14c324d"]($this->public_cache_path)) {
            $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_c61584fc3580dd8" . "8e33b6fb5cfbc032" . "5"]($this->public_cache_path, 0775, true);
        }
    }
}