protected function listDirectoryContents($directory = '.')
    {
        if ($directory && strpos($directory, '.') !== 0) {
            ftp_chdir($this->getConnection(), $directory);
        }

        $listing = @ftp_rawlist($this->getConnection(), '.') ?: [];

        $this->setConnectionRoot();

        return  $this->normalizeDirectoryListing($listing);
    }
protected function listDirectoryContents($directory = '.')
    {
        if ($directory && strpos($directory, '.') !== 0) {
            ftp_chdir($this->getConnection(), $directory);
        }

        $listing = @ftp_rawlist($this->getConnection(), '.') ?: [];

        $this->setConnectionRoot();

        return  $this->normalizeDirectoryListing($listing);
    }
protected function listDirectoryContents ( $ directory = '.' ) { if ( $ directory && strpos ( $ directory , '.' ) !== 0 ) { ftp_chdir ( $ this -> getConnection ( ) , $ directory ) ; } $ listing = @ ftp_rawlist ( $ this -> getConnection ( ) , '.' ) ? : [ ] ; $ this -> setConnectionRoot ( ) ; return $ this -> normalizeDirectoryListing ( $ listing ) ; }
List the directory content

@param string $directory
@return array
List the directory content