def listdir(path): """ Lista un directorio @param path: Directorio a listar, debe ser un str "UTF-8" @type path: str @rtype: str @return: contenido de un directorio """ path = encode(path) if path.lower().startswith("smb://"): files, directories = samba.get_files_and_directories(path) files_directories = files + directories return decode(files_directories) else: return decode(os.listdir(path))