src/sb/SFTP/Client.php
public function ls($remote_dir)
    {
        $dir = "ssh2.sftp://".$this->sftp.$remote_dir;
        $handle = opendir($dir);
        $files = Array();
        while (false !== ($file = readdir($handle))) {
            if (substr($file, 0, 1) != '.'){
                $files[] = $file;
            }
        }

        closedir($handle);

        return $files;

    }
public function ls($remote_dir)
    {
        $dir = "ssh2.sftp://".$this->sftp.$remote_dir;
        $handle = opendir($dir);
        $files = Array();
        while (false !== ($file = readdir($handle))) {
            if (substr($file, 0, 1) != '.'){
                $files[] = $file;
            }
        }

        closedir($handle);

        return $files;

    }
public function ls ( $ remote_dir ) { $ dir = "ssh2.sftp://" . $ this -> sftp . $ remote_dir ; $ handle = opendir ( $ dir ) ; $ files = Array ( ) ; while ( false !== ( $ file = readdir ( $ handle ) ) ) { if ( substr ( $ file , 0 , 1 ) != '.' ) { $ files [ ] = $ file ; } } closedir ( $ handle ) ; return $ files ; }
Lists the contents of a remote directory
@param string $remote_dir
@return Array The array of files
Lists the contents of a remote directory