public function listFiles($path = '/./')
    {
        $handle = opendir('ssh2.sftp://' . (string) $this->ftpConnection . $path);

        $files = [];

        while (($file = readdir($handle)) !== false) {

            if ($file === '.' || $file === '..') continue;

            $files[] = $file;
        }

        closedir($handle);

        return $files;
    }
public function listFiles($path = '/./')
    {
        $handle = opendir('ssh2.sftp://' . (string) $this->ftpConnection . $path);

        $files = [];

        while (($file = readdir($handle)) !== false) {

            if ($file === '.' || $file === '..') continue;

            $files[] = $file;
        }

        closedir($handle);

        return $files;
    }
public function listFiles ( $ path = '/./' ) { $ handle = opendir ( 'ssh2.sftp://' . ( string ) $ this -> ftpConnection . $ path ) ; $ files = [ ] ; while ( ( $ file = readdir ( $ handle ) ) !== false ) { if ( $ file === '.' || $ file === '..' ) continue ; $ files [ ] = $ file ; } closedir ( $ handle ) ; return $ files ; }
Lists files in the given path

@param string $path
@return array
Lists files in the given path