parameters: (self, remote_path, stat_dict=False)
docstring: List a directory on the remote machine.
  
          :param remote_path: Path to directory
          :param stat_dict: If set to True, return a dict of file metadata
          :returns: List of files, unless stat_dict is True
docstring_summary: List a directory on the remote machine.
docstring_tokens: List a directory on the remote machine .
function: def getdir(self, remote_path, stat_dict=False):
          """List a directory on the remote machine.
  
          :param remote_path: Path to directory
          :param stat_dict: If set to True, return a dict of file metadata
          :returns: List of files, unless stat_dict is True
  
          """
  
          if stat_dict == True:
              return self.getlongdir(remote_path)
          else:
  
              length = int(
                  self._simple_command("getdir {0}\n".format(quote(remote_path)))
              )
              result = self._get_fixed_data(length).decode()
  
              files = result.rstrip().split("\n")
              return files
function_tokens: def getdir ( self , remote_path , stat_dict = False ) : if stat_dict == True : return self . getlongdir ( remote_path ) else : length = int ( self . _simple_command ( "getdir {0}\n" . format ( quote ( remote_path ) ) ) ) result = self . _get_fixed_data ( length ) . decode ( ) files = result . rstrip ( ) . split ( "\n" ) return files