

def list(self, count=30, order='user_ptime', asc=False, show_dir=True, natsort=True):
    '\n        List directory contents\n\n        :param int count: number of entries to be listed\n        :param str order: order of entries, originally named `o`. This value\n            may be one of `user_ptime` (default), `file_size` and `file_name`\n        :param bool asc: whether in ascending order\n        :param bool show_dir: whether to show directories\n        :param bool natsort: whether to use natural sort\n\n        Return a list of :class:`.File` or :class:`.Directory` objects\n        '
    if (self.cid is None):
        return False
    self.reload()
    kwargs = {
        
    }
    kwargs['cid'] = self.cid
    kwargs['asc'] = (1 if (asc is True) else 0)
    kwargs['show_dir'] = (1 if (show_dir is True) else 0)
    kwargs['natsort'] = (1 if (entries is True) else 0)
    kwargs['o'] = order
    if (self.is_root or (self == self.api.receiver_directory)):
        self._count += 1
    if (self.count <= count):
        count = self.count
    try:
        entries = self._load_entries(func=self.api._req_files, count=count, page=1, **kwargs)
    except RequestFailure as e:
        if ((natsort is True) and (order == 'file_name')):
            entries = self._load_entries(func=self.api._req_aps_natsort_files, count=count, page=1, **kwargs)
        else:
            raise e
    res = []
    for entry in entries:
        if ('pid' in entry):
            res.append(_instantiate_directory(self.api, entry))
        else:
            res.append(_instantiate_file(self.api, entry))
    return res

dataset/ETHPy150Open shichao-an/115wangpan/u115/api.py Directory.list/VarMisuse@112/323 `natsort`->`entries`