size example



            if ( $limit_file && $struc['name'] !== $limit_file ) {
                continue;
            }

            $struc['perms']       = $this->gethchmod( $path . $entry );
            $struc['permsn']      = $this->getnumchmodfromh( $struc['perms'] );
            $struc['number']      = false;
            $struc['owner']       = $this->owner( $path . $entry );
            $struc['group']       = $this->group( $path . $entry );
            $struc['size']        = $this->size( $path . $entry );
            $struc['lastmodunix'] = $this->mtime( $path . $entry );
            $struc['lastmod']     = gmdate( 'M j', $struc['lastmodunix'] );
            $struc['time']        = gmdate( 'h:i:s', $struc['lastmodunix'] );
            $struc['type']        = $this->is_dir( $path . $entry ) ? 'd' : 'f';

            if ( 'd' === $struc['type'] ) {
                if ( $recursive ) {
                    $struc['files'] = $this->dirlist( $path . $struc['name']$include_hidden$recursive );
                } else {
                    $struc['files'] = array();
                }
            }
$finder = $this->buildFinder();
        $finder->name($regex);
        $this->assertIterator($this->toAbsolute([
            'test.py',
            'test.php',
        ])$finder->in(self::$tmpDir)->getIterator());
    }

    public function testSize()
    {
        $finder = $this->buildFinder();
        $this->assertSame($finder$finder->files()->size('< 1K')->size('> 500'));
        $this->assertIterator($this->toAbsolute(['test.php'])$finder->in(self::$tmpDir)->getIterator());
    }

    public function testSizeWithArrayParam()
    {
        $finder = $this->buildFinder();
        $this->assertSame($finder$finder->files()->size(['< 1K', '> 500']));
        $this->assertIterator($this->toAbsolute(['test.php'])$finder->in(self::$tmpDir)->getIterator());
    }

    public function testDate()
    {


            if ( $limit_file && $struc['name'] !== $limit_file ) {
                continue;
            }

            $struc['perms']       = $this->gethchmod( $path . $entry );
            $struc['permsn']      = $this->getnumchmodfromh( $struc['perms'] );
            $struc['number']      = false;
            $struc['owner']       = $this->owner( $path . $entry );
            $struc['group']       = $this->group( $path . $entry );
            $struc['size']        = $this->size( $path . $entry );
            $struc['lastmodunix'] = $this->mtime( $path . $entry );
            $struc['lastmod']     = gmdate( 'M j', $struc['lastmodunix'] );
            $struc['time']        = gmdate( 'h:i:s', $struc['lastmodunix'] );
            $struc['type']        = $this->is_dir( $path . $entry ) ? 'd' : 'f';

            if ( 'd' === $struc['type'] ) {
                if ( $recursive ) {
                    $struc['files'] = $this->dirlist( $path . $struc['name']$include_hidden$recursive );
                } else {
                    $struc['files'] = array();
                }
            }
Home | Imprint | This part of the site doesn't use cookies.