lib/Util/Archive/FileAdder.php
public function addChildren($dirPathname)
    {
        $files = new \RecursiveIteratorIterator(
            new \RecursiveDirectoryIterator($dirPathname, \FilesystemIterator::SKIP_DOTS),
            \RecursiveIteratorIterator::SELF_FIRST
        );

        foreach($files as $info)
        {
            $relativePathname = $this->subtractBasedir($info->getPathname(), $dirPathname);
            #echo sprintf("%s\n", $relativePathname);

            if ($info->isDir())
            {
                $this->zip->addEmptyDir($relativePathname);
            }
            else {
                $this->zip->addFile($info->getPathname(), $relativePathname);
            }
        }
    }
public function addChildren($dirPathname)
    {
        $files = new \RecursiveIteratorIterator(
            new \RecursiveDirectoryIterator($dirPathname, \FilesystemIterator::SKIP_DOTS),
            \RecursiveIteratorIterator::SELF_FIRST
        );

        foreach($files as $info)
        {
            $relativePathname = $this->subtractBasedir($info->getPathname(), $dirPathname);
            #echo sprintf("%s\n", $relativePathname);

            if ($info->isDir())
            {
                $this->zip->addEmptyDir($relativePathname);
            }
            else {
                $this->zip->addFile($info->getPathname(), $relativePathname);
            }
        }
    }
public function addChildren ( $ dirPathname ) { $ files = new \ RecursiveIteratorIterator ( new \ RecursiveDirectoryIterator ( $ dirPathname , \ FilesystemIterator :: SKIP_DOTS ) , \ RecursiveIteratorIterator :: SELF_FIRST ) ; foreach ( $ files as $ info ) { $ relativePathname = $ this -> subtractBasedir ( $ info -> getPathname ( ) , $ dirPathname ) ; #echo sprintf("%s\n", $relativePathname); if ( $ info -> isDir ( ) ) { $ this -> zip -> addEmptyDir ( $ relativePathname ) ; } else { $ this -> zip -> addFile ( $ info -> getPathname ( ) , $ relativePathname ) ; } } }
Recursively add children of directory to archive

@example Pathname of '/share/lib' will add all children of '/share/lib', not including '/share/lib'

@param string $dirPathname The full directory pathname
Recursively add children of directory to archive