original_string: 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;
  
      }
code: 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;
  
      }
code_tokens: 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 ; }
docstring: Lists the contents of a remote directory
  @param string $remote_dir
  @return Array The array of files
docstring_tokens: Lists the contents of a remote directory