public function files($dirname = '.')
    {
        $listing = $this->listDirectoryContents($dirname);

        return array_values(array_filter($listing, function ($item) {
            return $item['type'] === 'file';
        }));
    }
public function files($dirname = '.')
    {
        $listing = $this->listDirectoryContents($dirname);

        return array_values(array_filter($listing, function ($item) {
            return $item['type'] === 'file';
        }));
    }
public function files ( $ dirname = '.' ) { $ listing = $ this -> listDirectoryContents ( $ dirname ) ; return array_values ( array_filter ( $ listing , function ( $ item ) { return $ item [ 'type' ] === 'file' ; } ) ) ; }
List files in a directory

@param  string $dirname
@return array
List files in a directory