def listdir(self, sortkey=None, reverse=False):
if self._listdir_cache is None:<EOL><INDENT>self._listdir_cache = tuple(self._listdir())<EOL><DEDENT>if sortkey:<EOL><INDENT>return sorted(self._listdir_cache, key=sortkey, reverse=reverse)<EOL><DEDENT>data = list(self._listdir_cache)<EOL>if reverse:<EOL><INDENT>data.reverse()<EOL><DEDENT>return data<EOL>
Get sorted list (by given sortkey and reverse params) of File objects.

:return: sorted list of File instances
:rtype: list of File instances