Return list of files/directories. Each item is a dict. 
        Keys: 'path', 'creationdate', 'displayname', 'length', 'lastmodified', 'isDir'.

def ls(self, path, offset=None, amount=None):
        """
        Return list of files/directories. Each item is a dict. 
        Keys: 'path', 'creationdate', 'displayname', 'length', 'lastmodified', 'isDir'.
        """
        
        def parseContent(content):
            result = []
            root = ET.fromstring(content)
            for response in root.findall('.//d:response', namespaces=self.namespaces):
                node = {
                    'path': response.find("d:href", namespaces=self.namespaces).text,
                    'creationdate': response.find("d:propstat/d:prop/d:creationdate", namespaces=self.namespaces).text,
                    'displayname': response.find("d:propstat/d:prop/d:displayname", namespaces=self.namespaces).text,
                    'lastmodified': response.find("d:propstat/d:prop/d:getlastmodified", namespaces=self.namespaces).text,
                    'isDir': response.find("d:propstat/d:prop/d:resourcetype/d:collection", namespaces=self.namespaces) != None
                }
                if not node['isDir']:
                    node['length'] = response.find("d:propstat/d:prop/d:getcontentlength", namespaces=self.namespaces).text
                    node['etag'] = response.find("d:propstat/d:prop/d:getetag", namespaces=self.namespaces).text
                    node['type'] = response.find("d:propstat/d:prop/d:getcontenttype", namespaces=self.namespaces).text
                result.append(node)
            return result

        url = path
        if (offset is not None) and (amount is not None):
            url += "?offset={offset}&amount={amount}".format(offset=offset, amount=amount)
        resp = self._sendRequest("PROPFIND", url, {'Depth': '1'})
        if resp.status_code == 207:
            return parseContent(resp.content)
        else:
            raise YaDiskException(resp.status_code, resp.content)