def ls(self, path, detail=True, **kwargs):
    path = self._strip_protocol(path)
    files = {file['name']: file for file in self._fs_contents if (path == self._parent(file['name']))}
    if detail:
        return [files[name] for name in sorted(files)]
    return list(sorted(files))
def ls(self, path, detail=True, **kwargs):
    path = self._strip_protocol(path)
    files = {file['name']: file for file in self._fs_contents if (path == self._parent(file['name']))}
    if detail:
        return [files[name] for name in sorted(files)]
    return list(sorted(files))