'Get a list of all directories and subdirectories.'

def get_directories(self):

    res = []
    current_url = self.copy()
    res.append(current_url.get_domain_path())
    while (current_url.get_path().count('/') != 1):
        current_url = current_url.url_join('../')
        res.append(current_url)
    return res
