public function listContents($dirname = '', $recursive = false)
    {
        $result = [];

        foreach ($this->cache as $object) {
            if ($object === false) {
                continue;
            }
            if ($object['dirname'] === $dirname) {
                $result[] = $object;
            } elseif ($recursive && $this->pathIsInDirectory($dirname, $object['path'])) {
                $result[] = $object;
            }
        }

        return $result;
    }
public function listContents($dirname = '', $recursive = false)
    {
        $result = [];

        foreach ($this->cache as $object) {
            if ($object === false) {
                continue;
            }
            if ($object['dirname'] === $dirname) {
                $result[] = $object;
            } elseif ($recursive && $this->pathIsInDirectory($dirname, $object['path'])) {
                $result[] = $object;
            }
        }

        return $result;
    }
public function listContents ( $ dirname = '' , $ recursive = false ) { $ result = [ ] ; foreach ( $ this -> cache as $ object ) { if ( $ object === false ) { continue ; } if ( $ object [ 'dirname' ] === $ dirname ) { $ result [ ] = $ object ; } elseif ( $ recursive && $ this -> pathIsInDirectory ( $ dirname , $ object [ 'path' ] ) ) { $ result [ ] = $ object ; } } return $ result ; }
Get the contents listing.

@param string $dirname
@param bool   $recursive

@return array contents listing
Get the contents listing .