$57 GRAYBYTE WORDPRESS FILE MANAGER $93

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/php54/usr/share/pear/Symfony/Component/Finder/Iterator/

HOME
Current File : /opt/alt/php54/usr/share/pear/Symfony/Component/Finder/Iterator//FilePathsIterator.php
<?php

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

namespace Symfony\Component\Finder\Iterator;

use Symfony\Component\Finder\SplFileInfo;

/**
 * Iterate over shell command result.
 *
 * @author Jean-François Simon <[email protected]>
 */
class FilePathsIterator extends \ArrayIterator
{
    /**
     * @var string
     */
    private $baseDir;

    /**
     * @var int
     */
    private $baseDirLength;

    /**
     * @var string
     */
    private $subPath;

    /**
     * @var string
     */
    private $subPathname;

    /**
     * @var SplFileInfo
     */
    private $current;

    /**
     * @param array  $paths   List of paths returned by shell command
     * @param string $baseDir Base dir for relative path building
     */
    public function __construct(array $paths, $baseDir)
    {
        $this->baseDir       = $baseDir;
        $this->baseDirLength = strlen($baseDir);

        parent::__construct($paths);
    }

    /**
     * @param string $name
     * @param array  $arguments
     *
     * @return mixed
     */
    public function __call($name, array $arguments)
    {
        return call_user_func_array(array($this->current(), $name), $arguments);
    }

    /**
     * Return an instance of SplFileInfo with support for relative paths.
     *
     * @return SplFileInfo File information
     */
    public function current()
    {
        return $this->current;
    }

    /**
     * @return string
     */
    public function key()
    {
        return $this->current->getPathname();
    }

    public function next()
    {
        parent::next();
        $this->buildProperties();
    }

    public function rewind()
    {
        parent::rewind();
        $this->buildProperties();
    }

    /**
     * @return string
     */
    public function getSubPath()
    {
        return $this->subPath;
    }

    /**
     * @return string
     */
    public function getSubPathname()
    {
        return $this->subPathname;
    }

    private function buildProperties()
    {
        $absolutePath = parent::current();

        if ($this->baseDir === substr($absolutePath, 0, $this->baseDirLength)) {
            $this->subPathname = ltrim(substr($absolutePath, $this->baseDirLength), '/\\');
            $dir = dirname($this->subPathname);
            $this->subPath = '.' === $dir ? '' : $dir;
        } else {
            $this->subPath = $this->subPathname = '';
        }

        $this->current = new SplFileInfo(parent::current(), $this->subPath, $this->subPathname);
    }
}


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.54 PM
root / root
0755
CustomFilterIterator.php
1.508 KB
18 Dec 2019 11.22 AM
root / root
0644
DateRangeFilterIterator.php
1.427 KB
18 Dec 2019 11.22 AM
root / root
0644
DepthRangeFilterIterator.php
1.235 KB
18 Dec 2019 11.22 AM
root / root
0644
ExcludeDirectoryFilterIterator.php
1.402 KB
18 Dec 2019 11.22 AM
root / root
0644
FilePathsIterator.php
2.643 KB
18 Dec 2019 11.22 AM
root / root
0644
FileTypeFilterIterator.php
1.346 KB
18 Dec 2019 11.22 AM
root / root
0644
FilecontentFilterIterator.php
1.904 KB
18 Dec 2019 11.22 AM
root / root
0644
FilenameFilterIterator.php
1.685 KB
18 Dec 2019 11.22 AM
root / root
0644
FilterIterator.php
1.405 KB
18 Dec 2019 11.22 AM
root / root
0644
MultiplePcreFilterIterator.php
1.732 KB
18 Dec 2019 11.22 AM
root / root
0644
PathFilterIterator.php
1.914 KB
18 Dec 2019 11.22 AM
root / root
0644
RecursiveDirectoryIterator.php
2.976 KB
18 Dec 2019 11.22 AM
root / root
0644
SizeRangeFilterIterator.php
1.411 KB
18 Dec 2019 11.22 AM
root / root
0644
SortableIterator.php
2.485 KB
18 Dec 2019 11.22 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF