!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/multirest.picotech.app/public_html/vendor/league/flysystem/src/Util/   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:     ContentListingFormatter.php (2.53 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace League\Flysystem\Util;

use 
League\Flysystem\Util;

/**
 * @internal
 */
class ContentListingFormatter
{
    
/**
     * @var string
     */
    
private $directory;

    
/**
     * @var bool
     */
    
private $recursive;

    
/**
     * @var bool
     */
    
private $caseSensitive;

    
/**
     * @param string $directory
     * @param bool   $recursive
     */
    
public function __construct($directory$recursive$caseSensitive true)
    {
        
$this->directory rtrim($directory'/');
        
$this->recursive $recursive;
        
$this->caseSensitive $caseSensitive;
    }

    
/**
     * Format contents listing.
     *
     * @param array $listing
     *
     * @return array
     */
    
public function formatListing(array $listing)
    {
        
$listing array_filter(array_map([$this'addPathInfo'], $listing), [$this'isEntryOutOfScope']);

        return 
$this->sortListing(array_values($listing));
    }

    private function 
addPathInfo(array $entry)
    {
        return 
$entry Util::pathinfo($entry['path']);
    }

    
/**
     * Determine if the entry is out of scope.
     *
     * @param array $entry
     *
     * @return bool
     */
    
private function isEntryOutOfScope(array $entry)
    {
        if (empty(
$entry['path']) && $entry['path'] !== '0') {
            return 
false;
        }

        if (
$this->recursive) {
            return 
$this->residesInDirectory($entry);
        }

        return 
$this->isDirectChild($entry);
    }

    
/**
     * Check if the entry resides within the parent directory.
     *
     * @param array $entry
     *
     * @return bool
     */
    
private function residesInDirectory(array $entry)
    {
        if (
$this->directory === '') {
            return 
true;
        }

        return 
$this->caseSensitive
            
strpos($entry['path'], $this->directory '/') === 0
            
stripos($entry['path'], $this->directory '/') === 0;
    }

    
/**
     * Check if the entry is a direct child of the directory.
     *
     * @param array $entry
     *
     * @return bool
     */
    
private function isDirectChild(array $entry)
    {
        return 
$this->caseSensitive
            
$entry['dirname'] === $this->directory
            
strcasecmp($this->directory$entry['dirname']) === 0;
    }

    
/**
     * @param array $listing
     *
     * @return array
     */
    
private function sortListing(array $listing)
    {
        
usort($listing, function ($a$b) {
            return 
strcasecmp($a['path'], $b['path']);
        });

        return 
$listing;
    }
}

:: 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.0041 ]--