403Webshell
Server IP : 104.21.14.103  /  Your IP : 3.15.10.64
Web Server : LiteSpeed
System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : giankuin ( 1871)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/giankuin/khowordpress.com/wp-content/plugins/duplicator-pro/lib/fileops/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/giankuin/khowordpress.com/wp-content/plugins/duplicator-pro/lib/fileops/class.fileops.state.php
<?php
if (!defined("ABSPATH") && !defined("DUPXABSPATH"))
    die("");
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

class FileOpsState
{
    public static $instance = null;

    private $workerTime;
    private $directories;
    private $throttleDelay;
    private $excludedDirectories;
    private $excludedFiles;
    private $working = false;

    const StateFilename = 'state.json';

    public static function getInstance($reset = false)
    {
        if ((self::$instance == null) && (!$reset)) {
            $stateFilepath = dirname(__FILE__).'/'.self::StateFilename;

            self::$instance = new FileOpsState();

            if (file_exists($stateFilepath)) {
                $stateHandle = DupProSnapLibIOU::fopen($stateFilepath, 'rb');

                DupProSnapLibIOU::flock($stateHandle, LOCK_EX);

                $stateString = fread($stateHandle, filesize($stateFilepath));

                $data = json_decode($stateString);

                self::$instance->setFromData($data);

              //  self::$instance->fileRenames = (array)(self::$instance->fileRenames);

                DupProSnapLibIOU::flock($stateHandle, LOCK_UN);

                DupProSnapLibIOU::fclose($stateHandle);
            } else {
                $reset = true;
            }
        }

        if ($reset) {
            self::$instance = new FileOpsState();

            self::$instance->reset();
        }

        return self::$instance;
    }

    private function setFromData($data)
    {
   //     $this->currentFileHeader     = $data->currentFileHeader;
    }

    public function reset()
    {
        $stateFilepath = dirname(__FILE__).'/'.self::StateFilename;

        $stateHandle = DupProSnapLibIOU::fopen($stateFilepath, 'w');

        DupProSnapLibIOU::flock($stateHandle, LOCK_EX);

        $this->initMembers();

        DupProSnapLibIOU::fwrite($stateHandle, json_encode($this));

        DupProSnapLibIOU::fclose($stateHandle);
    }

    public function save()
    {
        $stateFilepath = dirname(__FILE__).'/'.self::StateFilename;

        $stateHandle = DupProSnapLibIOU::fopen($stateFilepath, 'w');

        DupProSnapLibIOU::flock($stateHandle, LOCK_EX);

        DupArchiveUtil::tlog("saving state");
        DupProSnapLibIOU::fwrite($stateHandle, json_encode($this));

        DupProSnapLibIOU::fclose($stateHandle);
    }

    private function initMembers()
    {
    //    $this->currentFileHeader = null;

    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit