$95 GRAYBYTE WORDPRESS FILE MANAGER $36

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

/opt/alt/php54/usr/share/doc/pear/Base/docs/

HOME
Current File : /opt/alt/php54/usr/share/doc/pear/Base/docs//tutorial_example_04.php
<?php
require 'tutorial_autoload.php';

class myProgressFinder
{
    static public function findRecursiveCallback( ezcBaseFileFindContext $context, $sourceDir, $fileName, $fileInfo )
    {
        // ignore if we have a directory, but do print a "." and sleep for
        // extra demo time
        if ( $fileInfo['mode'] & 0x4000 )
        {
            echo ".";
            usleep( 100000 );
            return;
        }

        // update the statistics
        $context->elements[] = $sourceDir . DIRECTORY_SEPARATOR . $fileName;
        $context->count++;
        $context->size += $fileInfo['size'];
    }

    static public function findRecursive( $sourceDir, array $includeFilters = array(), array $excludeFilters = array() )
    {
        // create the context, and then start walking over the array
        $context = new ezcBaseFileFindContext;
        ezcBaseFile::walkRecursive( $sourceDir, $includeFilters, $excludeFilters,
                array( 'myProgressFinder', 'findRecursiveCallback' ), $context );

        // collect the statistics (which we don't do anything with in this example)
        $statistics['size'] = $context->size;
        $statistics['count'] = $context->count;

        // return the found and pattern-matched files
        sort( $context->elements );
        return $context->elements;
    }
}

$files = myProgressFinder::findRecursive( dirname( __FILE__ ) );
var_dump( $files );
?>


Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.54 PM
root / root
0755
repos
--
3 Mar 2024 10.54 PM
root / root
0755
CREDITS
0.224 KB
18 Dec 2019 11.17 AM
root / root
0644
LICENSE
1.533 KB
18 Dec 2019 11.17 AM
root / root
0644
tutorial.txt
8.593 KB
18 Dec 2019 11.17 AM
root / root
0644
tutorial_autoload.php
0.483 KB
18 Dec 2019 11.17 AM
root / root
0644
tutorial_example_01.php
0.21 KB
18 Dec 2019 11.17 AM
root / root
0644
tutorial_example_02.php
0.185 KB
18 Dec 2019 11.17 AM
root / root
0644
tutorial_example_03.php
0.104 KB
18 Dec 2019 11.17 AM
root / root
0644
tutorial_example_04.php
1.391 KB
18 Dec 2019 11.17 AM
root / root
0644
tutorial_lazy_initialization.php
0.893 KB
18 Dec 2019 11.17 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF