def full_listdir(self, path):
dirs = set()<EOL>files = []<EOL>if path and not path.endswith("<STR_LIT:/>"):<EOL><INDENT>path = u"<STR_LIT>".format(path)<EOL><DEDENT>path_len = len(path)<EOL>for name in [x["<STR_LIT:name>"] for x in<EOL>self.connection.get_container(self.container_name, full_listing=True)[<NUM_LIT:1>]]:<EOL><INDENT>name = name[path_len:]<EOL>slash = name[<NUM_LIT:1>:-<NUM_LIT:1>].find("<STR_LIT:/>") + <NUM_LIT:1><EOL>if slash:<EOL><INDENT>dirs.add(name[:slash])<EOL><DEDENT>elif name:<EOL><INDENT>files.append(name)<EOL><DEDENT><DEDENT>dirs = list(dirs)<EOL>dirs.sort()<EOL>return (dirs, files)<EOL>
Lists the contents of the specified path, returning a 2-tuple
of lists; the first item being directories, the second item
being files.